simple-eval is a JavaScript expression evaluator for evaluating a deliberately limited subset of JavaScript expressions. It supports optional context values, and it can use an ESTree compliant parser like jsep (default) or alternatives such as acorn, @babel/parser, or esprima, while blocking certain dangerous access patterns. It is useful for computing expressions from strings with basic operators and selected globals, but it is not a sandbox for untrusted input.
Project status
- The source appears to be evolving, with an upstream push recorded on 2026-06-10, but the most recently summarized tagged update is v2.0.0 from 2025-05-30, suggesting updates/releases are not very frequent.
- Maintenance status is mixed: recent repo activity is visible (mid-2026 push), yet there have been no clearly documented tagged updates between 2025-05 and 2026-08, so practical maintenance via published changes looks relatively quiet.
AI summary generated
Recent updates
v2.0.0
v2.0.0 is a major internal rewrite of the library from JavaScript (.mjs) to TypeScript (.ts), with a build/test/tooling overhaul and a move to ESM packaging. The evaluator logic in reduce.ts was substantially changed, including how unary operators and array elements are handled. Release notes were not provided, so these behavioral and packaging changes are effectively undocumented.
BreakingFeaturesv1.0.1
v1.0.1 does not include any publisher release notes. The code diff shows the package version bump, addition of TypeScript type entry points in the exports map (including a new reduce.d.ts), and substantial dependency updates (notably a runtime dependency bump of jsep).
Featuresv1.0.0
Release v1.0.0 is published, but no release notes were provided by the publisher. As a result, this upgrade cannot be evaluated for specific new features, breaking changes, bug fixes, or security updates based on the release documentation alone.
v0.0.1
Release v0.0.1 ships with no published release notes. The code change indicates the library now accepts ESTree-style AST objects as input (in addition to parsing from a string), adds Program/ExpressionStatement handling, and improves support for expressions parsed by external parsers like espree. It also upgrades the jsep dependency significantly.
BreakingFeaturesv0.0.0
This release is tagged v0.0.0, but no release notes were provided by the publisher. Because no documented changes are available, there is no actionable information here to assess API compatibility, breaking changes, or migration steps.