Hacker News new | ask | show | jobs
by Someone 770 days ago
Combining that with https://www.npmjs.com/package/is-string, you can have a JavaScript valid x for which

  isNumber(x) && isString(x)
isNumber is better named “can-be-used-as-a-number”.

Also, I don’t know JavaScript well enough, but https://www.npmjs.com/package/isnumber is different code from https://www.npmjs.com/package/is-number, but does it have different semantics?

(https://www.npmjs.com/package/lodash.isnumber is different, I think. It (rightfully, IMHO) thinks ∞ and NaN are numbers)