It actually depends on "is-number", which is a very useful package containing
num => typeof num === "number"
No joke.
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