Hacker GitHub

← All repos

jonschlinkert/is-number

View on GitHub ↗ ★ 288 JavaScript

JavaScript/Node.js utility. Returns `true` if the value is a number or string number. Useful for checking regex match results, user input, parsed strings, etc.

6 mentions on Hacker News by 5 people: 1 story, 5 comments · first 2020-06-08 · latest 2025-09-21

Mentions per year 6 mentions · busiest year 2020 (2)
20082026
  1. …like 10 years old at this point. I don’t think we have to beat the dead horse one more time. [0]: https://github.com/jonschlinkert/is-number/issues/1
    comment by goranmoomin · 2025-09-21 · in The bloat of edge-case first libraries
  2. I don’t think the root logic it ultimately depends on is obvious: https://github.com/jonschlinkert/is-number/blob/master/index... And so this is a perfect abstraction to make something non- obvious obvious. The real question is why this…
  3. …profile of the author, the repository is still active on GitHub and there are active issues. [1] https://github.com/jonschlinkert/is-number
  4. > not what the code in this package does Here's `is-number` ( https://github.com/jonschlinkert/is-number/blob/master/index... ): module.exports = function(num) { if (typeof num === 'number') { return num - num === 0; } if (typeof num ===…
    comment by kinjba11 · 2021-07-08 · in Npm Audit: broken by design?
  5. …!== '') { return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); } return false; [0]: https://github.com/jonschlinkert/is-number/blob/master/index...
    comment by thunderbong · 2020-06-08 · in Is-Number Node Module