silentmatt / expr-eval

Mathematical expression evaluator in JavaScript
http://silentmatt.com/javascript-expression-evaluator/
MIT License
1.18k stars 239 forks source link

How to use expr-eval in an ES6 component on the browser #235

Open DragonOsman opened 3 years ago

DragonOsman commented 3 years ago

I'm trying to develop my project using expr-eval locally and have put it into a GitHub repository as well. I'm getting an error saying that exprEval is undefined.

I tried importing and using it like this:

import exprEval from "expr-eval";
...
const parser = new exprEval.Parser();

But I'm getting an error saying it's undefined.

DragonOsman commented 3 years ago

I'm not getting the error anymore.