Hacker News new | ask | show | jobs
by joegibbs 769 days ago
It actually depends on "is-number", which is a very useful package containing

   num => typeof num === "number"
No joke.
1 comments

To be completely fair, it does a little bit more than that. It only considers finite numbers as 'numbers' (ie NaN and Inf aren't considered numbers). It also considers strings that can be parsed as numbers as numbers. Of course reasonable people could consider both those 'features' as bugs