Registry / serialization / esprima-six-jpike

esprima-six-jpike

JSON →
library1.1.1-dev-harmonyjsnpmunverified

Esprima (version 1.1.1-dev-harmony) is a high-performance, standard-compliant ECMAScript parser written in JavaScript. It supports full ES5.1 and experimental ES6/Harmony features (modules, classes, destructuring). Runs in browsers (IE6+) and Node.js (>=0.4.0). Known for being up to 3x faster than UglifyJS v1. This is an unofficial fork with the '-harmony' suffix, indicating pre-release support for ES6. Note: this package may be considered obsolete compared to mainline esprima releases.

npm install esprima-six-jpike
INSTALL
IMPORT
SIG · ESPRIMA-SIX-JPIKE
E
esprima-six-jpike
serializationjavascriptv1.1.1-dev-harmony
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.

parse
✓ import { parse } from 'esprima-six-jpike'
✗ const parse = require('esprima-six-jpike').parse
ESM-style import works in supported Node versions; CommonJS require is also possible but the package uses global scope.
tokenize
✓ import { tokenize } from 'esprima-six-jpike'
✗ import tokenize from 'esprima-six-jpike/tokenize'
tokenize is available as a named export from the main module.
Syntax (type object)
✓ import { Syntax } from 'esprima-six-jpike'
✗ const Syntax = require('esprima-six-jpike').Syntax
Syntax is a named export containing node type constants. ESM is preferred in modern Node.

Shows parsing and tokenizing JavaScript code, including experimental ES6/Harmony syntax using the fork.

import { parse, tokenize } from 'esprima-six-jpike'; const code = 'const answer = 42;'; // Parse to AST (supports ES5.1, experimental harmony) const ast = parse(code, { tolerant: true, loc: true }); console.log(JSON.stringify(ast, null, 2)); // Tokenize const tokens = tokenize(code, { range: true }); console.log(tokens); // Example with harmony syntax const harmonyCode = 'class Person { constructor(name) { this.name = name; } }'; const harmonyAst = parse(harmonyCode, { jsx: false, type: 'module' }); console.log(harmonyAst);
Debug
Known issues
deprecatedThis package is an unofficial fork (esprima-six-jpike) and may not be maintained. Use official 'esprima' package instead.
fix
Switch to 'esprima' latest stable version (e.g., 4.0.1).
affects: >=1.0.0
gotchaThe '-harmony' suffix indicates pre-release ES6 support; features may be incomplete or unstable.
fix
For production ES6 parsing, use a dedicated ES6 parser like 'acorn' with the 'ecmaVersion' option.
affects: >=1.0.0
breakingNode engine requirement '>=0.4.0' is extremely old; newer Node versions may have compatibility issues or missing globals.
fix
Use a recent Node LTS version (e.g., 14.x or later) and test thoroughly, or migrate to a maintained parser.
affects: >=1.0.0
Errors
Common errors & fixes
ReferenceError: window is not defined
The package assumes a browser environment with 'window' global.
fix
Run in a browser or use a shim like 'global.window = global;' in Node.js.
TypeError: esprima is not a function
Incorrect import syntax (e.g., using default import instead of named import).
fix
Use named import: import { parse } from 'esprima-six-jpike'.
SyntaxError: Unexpected token ILLEGAL
The code contains ES6+ syntax that the harmony fork does not support fully.
fix
Use the 'ecmaVersion' option in a modern parser like 'acorn', or rewrite to ES5.1.
Upgrade
Version history
1.1.1-dev-harmonylatest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
esprima-six-jpike — npm install esprima-six-jpike · libregistry