You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried to run this code as mention in docs but getting error
const { parse } = require('esprima');
const { evaluate } = require('eval-estree-expression');
const ast = parse('[1, 2, 3].map(n => n * x);').body[0].expression;
I have tried to run this code as mention in docs but getting error
const { parse } = require('esprima');
const { evaluate } = require('eval-estree-expression');
const ast = parse('[1, 2, 3].map(n => n * x);').body[0].expression;
// evaluate synchronously
console.log(evaluate.sync(ast)); // => [2, 4, 6]
// or asynchronously
console.log(await evaluate(ast)); // => [2, 4, 6]
The text was updated successfully, but these errors were encountered: