Registry / serialization / jazzle

jazzle

JSON →
library0.9.12jsnpmunverified

Jazzle is a high-performance ECMAScript transpiler with zero dependencies, designed to convert modern JavaScript features (destructuring, classes, lexical variables, arrow functions, template strings) into ES5-compatible code. As of version 0.9.12, it is still in active development with a focus on efficiency and correctness, notably handling temporal dead zones and super-bound this references. It claims to be roughly 2x faster than Babel on early benchmarks. The package provides a programmatic API (Node.js >=6.20.0) with CLI support planned but not yet released. It differentiates itself by targeting edge cases often missed by other transpilers, while maintaining minimal footprint.

npm install jazzle
INSTALL
IMPORT
SIG · JAZZLE
J
jazzle
serializationjavascriptv0.9.12
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.

jazzle
const jazzle = require('jazzle')
import jazzle from 'jazzle'
The package is CJS-only and does not support ESM imports.
transform
const result = jazzle.transform(src, options)
jazzle.transform(src)
Options must be provided; setting sourceType correctly (e.g., 'module') is important for modern syntax.
default
const jazzle = require('jazzle')
const { jazzle } = require('jazzle')
The default export is the main transform function, not an object with a 'jazzle' property.

Demonstrates basic usage: requiring jazzle, transforming a code snippet with options, and logging the output.

const jazzle = require('jazzle'); const src = 'let [myCoolSource] = ((a=myCoolSource) => [a])();'; const options = { sourceType: 'module' }; const result = jazzle.transform(src, options); console.log(result.code); // Output includes sourceMap property as well
Debug
Known issues
gotchaOptions object (including sourceType) is required; omitting it may cause unexpected behavior or errors.
fix
Always pass an options object with at least sourceType set to 'module' or 'script' as appropriate.
affects: >=0.0.0
gotchaCLI is not yet available despite being referenced in the README; use programmatic API only.
fix
Use the Node.js API via require('jazzle') for all transpilation tasks.
affects: >=0.0.0
breakingVersion 0.x may contain breaking changes between minor versions; no stability guarantees.
fix
Pin to a specific version and test before upgrading.
affects: >=0.0.0 <1.0.0
gotchaThe package does not support ESM imports; only CommonJS require works.
fix
Use require() instead of import statements when consuming this package.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'jazzle'
Package not installed or global install not in NODE_PATH.
fix
Run 'npm install jazzle' locally or 'npm install -g jazzle' for global CLI (though CLI not available).
TypeError: jazzle.transform is not a function
Using default import incorrectly (e.g., import jazzle from 'jazzle' with ESM bundler).
fix
Use 'const jazzle = require("jazzle")' and then call jazzle.transform().
SyntaxError: Unexpected token (1:4) / unsupported feature
Source code uses syntax not supported by Jazzle or missing sourceType option.
fix
Ensure sourceType is 'module' for ES modules, and check that the feature is supported by Jazzle.
Upgrade
Version history
0.9.12latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
3
Resources
jazzle — npm install jazzle · libregistry