Registry / devops / igniculus

igniculus

JSON →
library1.5.0jsnpmunverified

Igniculus (v1.5.0) is a SQL syntax highlighter and logger for Node.js ≥4. It colorizes SQL output in the terminal using ANSI escape codes. Unlike heavier formatters, it is unadorned and fully customizable: users can define styles (foreground, background, bold, inverse, underline) per token type (keywords, constants, operators, comments, data types, etc.) and even supply custom keyword lists. It is available as a CommonJS package with no runtime dependencies. The project is in maintenance mode (last release 2018), with no active development or ESM support.

npm install igniculus
INSTALL
IMPORT
SIG · IGNICULUS
I
igniculus
devopsjavascriptv1.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default export (factory function)
const igniculus = require('igniculus');
import igniculus from 'igniculus';
Package offers only a CommonJS default export; no named exports or ESM wrapper exist. Attempting ESM import will fail.
.log method (singleton logger)
igniculus.log('SELECT 1');
igniculus().log('SELECT 1');
After initializing with igniculus(options), the singleton retains the log function on igniculus.log. Calling igniculus(options) again resets the logger.
type of igniculus default export
const igniculus: (options?: Options) => (sql: string) => void = require('igniculus');
No TypeScript types shipped; users must declare manually. The exported value is a factory function returning a logger function.

Initializes igniculus with default options and highlights a SELECT query including delimited identifiers, string constants, and numbers.

const igniculus = require('igniculus')(); const query = 'SELECT [port] AS Printer, \'on fire\' AS Status ' + 'FROM [Printers] P ' + 'WHERE P."online" = 1 AND P."check" = 1'; igniculus(query); // Output is colorized SQL printed to stdout (ANSI colors)
Debug
Known issues
breakingUsing import syntax (ESM) will throw because the package is CommonJS-only.
fix
Use require('igniculus') instead of import.
affects: >=1.0.0
gotchaCalling igniculus(options) a second time overwrites the singleton log function; previous logger references break.
fix
Store the logger returned by factory: const logger = igniculus(options); then always use logger(sql).
affects: >=1.0.0
gotchaThe package requires Node.js >=4.0.0. Using on older Node versions will fail with runtime errors.
fix
Upgrade Node.js to version 4 or higher.
affects: >=1.0.0
gotchaColors are only visible in terminal environments that support ANSI escape sequences. Logging to files or non-TTY streams will show raw sequences.
fix
Use a library like chalk to detect TTY and conditionally apply colors, or redirect with an appropriate viewer.
affects: >=1.0.0
deprecatedPackage has not been updated since 2018; no support for recent Node.js features (ESM, async operations). Use at your own risk.
fix
Consider alternatives like sql-formatter + chalk, or yasql for active development.
affects: <=1.5.0
Errors
Common errors & fixes
ReferenceError: igniculus is not defined
Using import statement with a CommonJS-only package.
fix
Replace 'import igniculus from "igniculus"' with 'const igniculus = require("igniculus")'.
TypeError: igniculus is not a function
Forgetting to call the factory function; igniculus is a function that returns a logger.
fix
Use 'const logger = igniculus();' then call 'logger(query)'.
TypeError: igniculus.log is not a function
Calling igniculus.log before initializing the logger via igniculus().
fix
Call igniculus() at least once before using igniculus.log(). Or use the returned logger directly.
Upgrade
Version history
1.5.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
igniculus — npm install igniculus · libregistry