jiggzson / nerdamer

a symbolic math expression evaluator for javascript
http://www.nerdamer.com
MIT License
514 stars 82 forks source link

Expression doesn't get invalidated correctly. #583

Closed iamprayush closed 3 years ago

iamprayush commented 3 years ago

Parsing expressions like + or (+) should yield errors but they don't. I tried running console.log(nerdamer('+')) and no errors were thrown, whereas if I did the same with any other operator, errors were thrown as expected.

jiggzson commented 3 years ago

@iamprayush, agreed. This should be easy enough to fix. I'll probably have it throw something like UnexpectedOperatorError.