-
Notifications
You must be signed in to change notification settings - Fork 64
Refactored number parsing #27
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
Conversation
Great work! Sorry I didn't see this sooner, I've been traveling for work. The only question I have is do we want the new lenient behavior where it will parse invalid numbers without throwing an error? For example, try parsing |
|
I replaced |
I had a thought. If someone needs to have an exception thrown you could perhaps compare things that come out as NaN and see if their original input was the String "NaN", and throw an exception in that case. |
@mattsgarlata Original NaN string won't make into this block it will be parsed as a string earlier. If |
@creationix would you mind bumping up a version on this repo so the |
OK @mpnovikova. I'm not really worried about this change, but thought I should bring up the exception handling in case anyone else had a strong opinion about it. It certainly was impressive how much code you were able to remove in this pull request! |
Thank you! Certainly a good point special |
@mpnovikova I believe your changes are in the latest release. Let me know if you need anything else. |
Thank you @creationix |
Simplified and refactored number parsing. All 117 unit tests are passing