{"library":"subscript","type":"library","category":null,"description":"Subscript is a modular and extensible expression parser and evaluator for JavaScript and TypeScript. It provides a lightweight core for building custom Domain Specific Languages (DSLs) and offers several ready-to-use presets, including `subscript` (common expressions), `justin` (JSON, templates, arrow functions, optional chaining), and `jessie` (a JavaScript subset supporting statements, functions, and control flow). The package is currently at version 10.3.2 and maintains an active release cadence with frequent minor and major updates introducing new syntax features, performance improvements, and API refinements. Key differentiators include its small bundle size (~2KB core), high performance for both parsing and evaluation, a minimal JSON-compatible Abstract Syntax Tree (AST), and built-in sandboxing to prevent prototype pollution and global access. It is designed to be universal, fast, and safe, making it suitable for templates, calculators, safe evaluation environments, and language subsets.","language":"javascript","status":"active","version":"10.3.2","tags":["javascript","parser","expression","language","dsl","syntax","modular","extensible","pratt","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install subscript","imports":["import subscript from 'subscript'","import justin from 'subscript/justin.js'","import { parse } from 'subscript'","import { codegen } from 'subscript/util/stringify.js'"]},{"cmd":"yarn add subscript","imports":[]},{"cmd":"pnpm add subscript","imports":[]}],"homepage":null,"github":"https://github.com/dy/subscript","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/subscript","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/subscript/compatibility"}}