Closed rossm6 closed 1 year ago
I've noticed something like this doesn't work.
const { evaluate, parse, registerPlugin }= require('jse-eval'); const newPlugin = require('@jsep-plugin/new'); registerPlugin(newPlugin); const p = parse("new Date(new Date().setDate(new Date().getDate()-5))"); evaluate(p, { Date }); // gives error: Error: 'setDate' is not a function
Thanks for reporting @rossm6 ! It looks like an incorrect AST is being generated by JSEP (and I see the related issue you submitted there).
closed in jsep-plugin/new v1.0.3
I've noticed something like this doesn't work.