xparse
Flexible expression parser for computing user defined conditionals
You can reference annotated source code here.
Usage
$ npm install xparse
const xparse = ; var expr = ; // returns 100
Dynamic Variables
var variables = hello: 70var variableskeyvar expr = ; // returns true (since 70 is less than 25 * 4) variableshello = 125 // returns false (since 125 is not less than 25 * 4)
Dynamic Functions
var functions = { arg + 1 } { arg - 1 }var { functionskeyarg }var expr = ; // returns true (since 71 is less than 25 * 4) functions { arg + 100 } // returns false (since 170 is not less than 25 * 4)
License
This software is brought to you by Corenova Technologies. We'd love to hear your feedback. Please feel free to reach me at peter@corenova.com anytime with questions, suggestions, etc.