@mariozechner/jailjs
Version:
Lightweight JavaScript interpreter for isolated execution. For plugins, user scripts, and browser extensions. Not for adversarial code - use SandboxJS or isolated-vm for that.
13 lines • 454 B
TypeScript
import type * as t from "@babel/types";
/**
* Parse JavaScript code into an AST
*
* This is a thin wrapper around @babel/parser that configures it
* for ES5 script parsing. Users can import this to parse code,
* or use their own parser and pass the AST to the interpreter.
*
* @param code - JavaScript code to parse
* @returns Babel AST Program node
*/
export declare function parse(code: string): t.Program;
//# sourceMappingURL=parser.d.ts.map