EricSmekens / jsep

JavaScript Expression Parser
http://ericsmekens.github.io/jsep/
MIT License
836 stars 136 forks source link

"Variable names cannot start with a number (...) at character ..." for hex, bin or numeric separators #206

Closed cimak closed 2 years ago

cimak commented 2 years ago

Well, #17 doesn't work anymore:

jsep('0xFE') // Variable names cannot start with a number (0x) at character 1
jsep('0b01010101') // Variable names cannot start with a number (0b) at character 1
jsep('115_200') // Variable names cannot start with a number (115_) at character 3
6utt3rfly commented 2 years ago

Thanks for pointing that out, @cimak . You could update your patch, but this type of change seems better suited to a plugin, so I took a stab at creating one (#207) to support additional number formats and the _ character.

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version @jsep-plugin/numbers-v1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: