New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle numbers greater that 10e21 and numbers that start with `0.`followed by more than 5 zeros. #1

Ynote opened this Issue Nov 18, 2018 · 1 comment


None yet
1 participant
Copy link

Ynote commented Nov 18, 2018

Description of the issue

As in JavaScript, number output is in fixed notation, except when it is greater that 10e21 and when it starts with 0.followed by more than 5 zeros (cf., the cast to a number with parseFloat and the final string equality can only handle the range between 10e21 and 0.00000x cases.

Possible solution

Using a RegExp. In that case, is the usage of parseFloat still appropriate?

@Ynote Ynote added the enhancement label Nov 18, 2018


This comment has been minimized.

Copy link

Ynote commented Nov 27, 2018

Another case in favor of using a RegExp : isStringANumber('042') doesn't return truebecause of the use ofparseFloat. Should 042returntrue` ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment