morph-expressions
An extremely efficient and flexible parser for Math or Logical expression using Javascript. It has all the basic functions supported with extensive support for new functions, variable etc.
Install
$ npm install morph-expressions
Usage
;const parser = ; const compiled = parser;compiled; // returns 2
You can also specify scope
:
const compiled = parser;compiledidentifiers; // ['x', 'y'] - returns list of identifiers, which used in expressioncompiled; // returns true //Or parser; // returns trueparser; // returns true
For register the custom function or computed properties
parser;parser; parser; // returns 16parser; // returns 'bar'
Test
To execute tests for the library, install the project dependencies once:
npm install
Then, the tests can be executed:
npm test