-
Notifications
You must be signed in to change notification settings - Fork 630
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
is.number(NaN) returning true #104
Comments
Hi @eriklharper, I think this has been fixed. Please check the latest version. |
#72 I actually fixed this last month.
It was decided that even though javascript considers NaN a number it goes against the point of the check so it now returns false for NaN. |
Could you please also change then the return of is.nan? |
@ekaradon If is.nan returns false on something, that does not mean that it has to be a number. console.log(NaN == NaN)
// false Also is.nan will "only" return true when the argument passed is not equal to itself (to keep it simple, when NaN is passed as argument). |
Not sure why, but that is what is happening:
Running 0.4.0 of is_js
The text was updated successfully, but these errors were encountered: