Skip to content

JSLike, a CSP-Safe Interpreter for JS, TS, JSX, TSX in JS

Build & Package

A production‑ready JavaScript interpreter that executes ES6+ code, JSX, and React components without eval or external dependencies

JavaScript Latest v1.8.12 · 1mo ago Security brief →

Features

  • Production‑ready execution of any size JS file with extensive test coverage
  • Full ES6+ support including classes, destructuring, template literals, arrow functions, etc.
  • Native JSX parsing and React component rendering without pre‑transformation
  • TypeScript/TSX module support via bundled Acorn‑Typescript parser
  • CSP‑safe tree‑walking interpreter (no eval or new Function)
  • REPL and CLI for interactive development and file execution

Recent releases

View all 11 releases →
Review required
v1.8.12 Bug fix
RCE / SSRF

Dynamic import fixes

v1.8.5 Bug fix

Fixed support for super.method() calls in arrow-function class fields on derived classes.

Full changelog

Fixed

  • Support super.method() inside arrow-function class fields on derived classes.
  • Bind super for prototype methods and class field initializers to parent prototype members with the derived instance as receiver.
  • Cover computed super[...]() calls, async parent methods, multi-level inheritance chains, and constructor super(...) compatibility.

Verification

  • npm run build passed. Existing wang-prism CommonJS warning remains unchanged.
  • npm test: 54 passed, 1359 passed | 4 skipped.
  • Issue #13 repro returns base.
  • npm pack --dry-run produced jslike-1.8.5.tgz.
  • Published to npm as [email protected] with latest dist-tag.

Fixes #13.

v1.8.4 Bug fix

Fixed binding of identifiers from defaulted object and array destructuring parameters.

Full changelog

Fixed

  • Bind identifiers from defaulted object and array destructuring parameters in functions, async callbacks, methods, and constructors.
  • Preserve nested destructuring defaults and rest parameter behavior through shared parameter binding logic.

Verification

  • npm run build passed. Existing wang-prism CommonJS warning remains unchanged.
  • npm test: 54 passed, 1351 passed | 4 skipped.
  • Issue #12 repro shape returns HiHi!.
  • npm pack --dry-run produced jslike-1.8.4.tgz.
  • Published to npm as [email protected] with latest dist-tag.

Fixes #12.

v1.8.3 Bug fix

Fixed JavaScript class instance field initialization across inheritance hierarchies.

Full changelog

Fixed

  • Initialize JavaScript class instance fields, including arrow function fields that capture this.
  • Apply inherited base class field initializers during super(...) and implicit subclass construction.
  • Preserve native class-field initialization order across base constructors, derived fields, computed fields, and multi-level inheritance.

Verification

  • npm run build passed. Existing wang-prism CommonJS warning remains unchanged.
  • npm test: 53 passed, 1344 passed | 4 skipped.
  • Issue #11 repro returns {"type":"function","value":42,"keys":["visit","v"]}.
  • npm pack --dry-run produced jslike-1.8.3.tgz.
  • Published to npm as [email protected] with latest dist-tag.

Fixes #11.

v1.8.2 Bug fix

Fixed missing-method errors when reflection traps throw during method suggestion collection.

Full changelog

Fixed

  • Prevent enhanced method suggestions from invoking strict function caller / arguments accessors or other throwing accessor properties while constructing missing-method errors.
  • Keep missing-method errors best-effort when reflection traps throw during method suggestion collection.

Verification

  • npm run build passed. Existing wang-prism CommonJS warning remains unchanged.
  • npm test: 52 passed, 1336 passed | 4 skipped.
  • npm pack --dry-run produced jslike-1.8.2.tgz.
  • Published to npm as [email protected] with latest dist-tag.

Fixes #10.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

About

Stars
12
Forks
1
Languages
JavaScript TypeScript
Downloads/week
407 ↓36%
NPM Maintainers
1 Single npm maintainer
Contributors
1
TypeScript
Types included ✓

Install & Platforms

Install via
npm

Beta — feedback welcome: [email protected]