A JavaScript implementation of JavaScript Style Expression Engine.
npm install js-el
var Expression = require('js-el');
var el = new Expression("(object.attr+x)+1+JSON.stringfy([c,d])")
console.info(String(el))
console.info(el.getVarMap())
console.info(el.getCallMap())
object.attr+x+1+JSON.stringfy([c,d])
{ object: [ 'attr' ],
x: [ '' ],
JSON: [ 'stringfy' ],
c: [ '' ],
d: [ '' ] }
{ JSON: [ 'stringfy' ] }
- #evaluate(token) #getVarMap() #getCallMap() #token