expr-eval
expr-eval copied to clipboard
Mathematical expression evaluator in JavaScript
Hello! Just wondering if there is a way to use `substitute` to resolve object property references. For example: ```javascript // having: const exp = parser.parse('variable1 + myObject.variable2 + variable3') //...
Have you considered adding support for a library such as https://github.com/jtobey/javascript-bignum in order to overcome JS's IEEE 754 limitations?
Looking at the code, on line 93 of the parser.js file, you have ``` this.binaryOps = { '+': add, '-': sub, '*': mul, '/': div, '%': mod, '^': Math.pow, '||':...
Hi, I find the feature that allows to implement new functions in the parser very useful. However it would be nice to be able to add new operator also. For...
Is there a way to evaluate an expression and concatenate strings in between? For example: `let expr = "'' + (datediff('mm', a, b) - datediff('yy', a, b) * 12) +...
Hy, I have a table with two colonns witch are @timestamp values. I need to calculate the diff between this two dates values.  My question is how can i...
I'm getting this error message: ``` Error: unexpected TEOF: EOF ▶ 15 stack frames were collapsed. handleEqualsClick E:/programming/react/javascript-calculator/src/js/components/App.js:216 213 | setEqualsClicked(true); 214 | const stored = storedValue.concat(currentValue); 215 | setStoredValue(stored);...
Hi, everyone. Is it okay to call that function without arguments if I don't have a variable to evaluate? How do I get the library to operate on the expression...
The ability to use the ?. and ?? operators in expressions to easily deal with potentially undefined values.
Hi, all. It's just as the title says, basically. The full error message I'm getting (in the console) is: ``` DevTools failed to load SourceMap: Could not load content for...