Skip to content
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 vs finite #43

Open
bishopZ opened this issue Sep 23, 2015 · 0 comments
Open

number vs finite #43

bishopZ opened this issue Sep 23, 2015 · 0 comments

Comments

@bishopZ
Copy link
Owner

bishopZ commented Sep 23, 2015

a quotation from underscore discussion:

_.isNumber( NaN ) is true because NaN is classified as a number just as
Infinity and -Infinity are.

The _.isNumber method is not intended for numeric validation just as _.isDate will not validate whether a date object is a valid date, new Date(Infinity).

If you're looking for validation there's _.isFinite or
ES6 Number.isFinite, Number.isNaN, Number.isInteger, and Number.isSafeInteger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant