Closed TBSten closed 2 years ago
hi .
I want to run the code below and use an "assignment statement" to make changes to the list of variables.
import jseEval, { registerPlugin } from "jse-eval"; import * as assignmentPlugin from "@jsep-plugin/assignment"; console.log("assignmentPlugin", assignmentPlugin); registerPlugin( assignmentPlugin, ) const expression = "count = 10"; const variables = { "a": "variable example", "b": 1234, } console.log(jseEval.evalExpr(expression, variables)) console.log(variables) //expect : { "a": "variable example" , "b": 1234, "count": 10 }
Error: Unexpected "=" at character 6
Is there anything missing?
it look like registerPlugin is wrong .
registerPlugin
The cause was my XXX setting. I reconfigured it properly and it worked as expected.
If the administrator of this repository has time, you can have this issue removed.
Glad you were able to resolve it, @TBSten 🙂
hi .
I want to run the code below and use an "assignment statement" to make changes to the list of variables.
code
output
Is there anything missing?
it look like
registerPlugin
is wrong .