Is there a way to throw an error/ignore if one or more variables is undefined?
const formula = 'x > 100 and y > 100';
const variables = { x: 120, y: undefined };
const v = { x: 12, y: undefined };
const expr = parser.parse(formula);
console.log(expr.evaluate(variables));
**output**: throws error Undefined variable y
console.log(expr.evaluate(v));
**output**: false, but i want it to throw an error here too.
Hi,
Is there a way to throw an error/ignore if one or more variables is undefined?