arasatasaygin/is.js

is.number returns True for `Infinity` and `-Infinity`

Opened this issue · 2 comments

The method is.number before #307 returns True in case of Infinity and -Infinity, which is something that might not be expected.

Though typeof(Infinity) in JS returns "number", this might not be what devs are expecting when they are using is.number

This has already been updated with this commit

@jdalton , what is your opinion on this? Should we stick to the old behaviour or change the definition of is.number for Infinity and -Infinity

This one can be closed as it's solved by #307 plus I've forked and upgraded the entire repo to ES6 plus in the progress also merged the tests for Infinity evdama@ba8cb0b