expr-eval icon indicating copy to clipboard operation
expr-eval copied to clipboard

Mathematical expression evaluator in JavaScript

Results 59 expr-eval issues
Sort by recently updated
recently updated
newest added

Like `50 + 10%`. Strange cases: `50 + 10% - 5` — it can't be treated as `10 % -5`, right?) `50 + 10% + 5` — if you going...

enhancement

`expression.toJSFunction(...)` doesn't work with CSP, unless `unsafe-eval` is included. We should consider wrapping a normal `evaluate` call in a function as a fallback in case `new Function` fails. The behavior...

enhancement
documentation

This pull request changes how the `simplify()` function works when dealing with expressions that can be simplified even further. **Example 1:** ```javascript true and true or true ``` Before the...

Add functions for manipulating dates, such as get current date, add, subtract, compare, and format. See #172

enhancement
function

While playing around, I saw an issue with the module, which is that when accessing functions in objects (with `Parser.prototype.evaluate`), these function lost their `this`. Example: ```js // requires and...

Make sure the documentation is up to date, and covers everything it needs to.

documentation
in-progress

Why is the Evalulate function limited to returning a number (i am using typescript) and not any object? I would like to calculate the difference between 2 dates and write...

bug

Hello, Let me start of by saying thanking you for making expr-eval, it is a great tool . I ran into an issue earlier today. I wanted to use the...

enhancement
documentation
parser

var Parser = require('expr-eval').Parser; var parser = new Parser(); var expr = parser.parse('x > 1'); console.log(expr.evaluate({ x: "3" })); //expected: true && actual: true expr = parser.parse('y == 3'); console.log(expr.evaluate({...

`expression.toString()` wraps non-atomic expressions in parentheses even when they're not needed. That's useful for debugging, but looks cluttered. It should include parentheses only where necessary by default, and have an...

enhancement