-
Notifications
You must be signed in to change notification settings - Fork 925
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
Numeral instantiated with non-numeric values return zero #53
Comments
I think you are right. I think the best would be: |
Perhaps returning |
I agree, that would be great. |
This would be great - either that or a "tryUnformat" method. |
@adamwdraper This issue has reared its head for me once again. As far as I can tell, there's no way to check a number's validity in Numeral.js. Any suggestions? |
This is stupid:
and why |
This has probably not been changed as I'm expecting most are used to it defaulting to this behavior, but in my opinion, numeral('not a number') should definitely not evaluate to zero. Is there a particular reason that the top level parser sets something to a number right after ascertaining that it isn't numeric?
I'm not expecting the default behavior to change for this, but couldn't there be some sort of "tolerant" setting that can be optionally disabled?
The text was updated successfully, but these errors were encountered: