-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Number out of precision. #23
Comments
what if |
I use like this:
destroy a record by id. |
I think it's a minimist issue, related to this line: https://github.com/substack/minimist/blob/4cf45a26b9af5f4ddab63107f4007485e576cfd3/index.js#L186 For a workaround, you can use |
Minimist is no longer a dependency it seems and the issue is still happening |
If you use something like:
You'll get But if you add
It sets strings to:
This whole auto-conversion by guessing needs to go. Args are strings unless explicitly declared otherwise.
In this specific example there is no big problem since I could convert it back. The real problem is when args are long strings like package numbers that look like numbers, but as soon as you auto convert them the data is lost because JS can't handle so big "numbers". |
I passed a number out of precision:
got n = 1002822319600013300, a number
also got n = 1002822319600013300, a number
May be better to parse parameter as string first and auto convert to number if within precision. :)
The text was updated successfully, but these errors were encountered: