estree-eval
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

estree-eval

Appveyor Build status npm package Greenkeeper badge

Evaluate estrees:

import { evaluate } from 'estree-eval';
import { parseExpressionAt } from 'acorn';
 
const ast = parseExpressionAt('message.toUpperCase()', 0);
 
const scope = { message: 'hello world' };
 
const result = evaluate(ast, scope); // HELLO WORLD

Dependents (0)

Package Sidebar

Install

npm i estree-eval

Weekly Downloads

4

Version

1.0.3

License

MIT

Last publish

Collaborators

  • jdanyow