Formula parser designed for Yotta Needs.
npm install fxparserLibrary provides a Parser class that evaluates excel and mathematical formulas.
1. Installation
2. Implementation
1. Html
2. js
3. Features
4. API
``sh`
$ npm install fxparser --save
`html
var parser = new fxParser.Parser();
parser.parse('SUM(1, 3, 9)');
// It returns Object {error: null, result: 13}
`$3
`js
var FxParser = require('fxparser').Parser;
var parser = new FxParser();
parser.parse('SUM(1, 3, 9)');
// It returns Object {error: null, result: 13}
`
It supports:
* Any numbers, negative and positive as float or integer;
Arithmetic operations like +, -, /, , %, ^;AND()
* Logical operations like , OR(), NOT(), XOR();=
* Comparison operations like , >, >=, <, <=, <>;PI()
* All JavaScript Math constants like , E(), LN10(), LN2(), LOG10E(), LOG2E(), SQRT1_2(), SQRT2();&
* String operations like (concatenation eq. parser.parse('-(2&5)'); will return -25);A1
* Relative and absolute cell coordinates like , $A1, A$1, $A$1;TRUE
* Build-in variables like , FALSE, NULL
* Custom variables;
* Custom functions/formulas;
* Node and Browser environment.
`sh``
$ node runthistest.js