Registry / devops / gel-minifier

gel-minifier

JSON →
library1.0.2jsnpmunverified

Minifies GEL (Generic Expression Language) expressions by removing unnecessary whitespace and comments. Version 1.0.2 is the latest stable release. Designed to work with custom tokenisers passed as a callback, making it extensible for different GEL dialects. Lightweight with no runtime dependencies, suitable for build-time or server-side minification.

npm install gel-minifier
INSTALL
IMPORT
SIG · GEL-MINIFIER
G
gel-minifier
devopsjavascriptv1.0.2
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.

gel-minifier
var gelMinifier = require('gel-minifier')(tokeniser);
var gelMinifier = require('gel-minifier');
The module exports a factory function that must be called with a tokeniser callback. CommonJS only; no ESM support.

Initialises the minifier with a custom tokeniser and minifies a GEL expression.

var gelMinifier = require('gel-minifier')(function(expression) { // Example: use a simple tokeniser that splits on whitespace return expression.split(/\s+/).filter(Boolean); }); var minified = gelMinifier('(&& 1 2)'); console.log(minified); // output: (&&1 2)
Debug
Known issues
gotchaThe module exports a factory, not the minifier directly. Calling require('gel-minifier') returns a function that expects a tokeniser callback.
fix
Call the factory: require('gel-minifier')(tokeniser).
affects: >=0.0.0
gotchaThe tokeniser callback must return an array of tokens; otherwise, the minifier may throw or produce incorrect output.
fix
Ensure the callback returns an array of strings.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: gelMinifier is not a function
Calling the factory incorrectly or using the result without calling it.
fix
Use: var minify = require('gel-minifier')(tokeniser); minify(expression);
Cannot find module 'gel-minifier'
Package not installed.
fix
Run: npm install gel-minifier
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
14
Bingbot
14
Resources
gel-minifier — npm install gel-minifier · libregistry