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
20082026
-
…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 -
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…
comment by pacifika · 2024-05-13 · in NPM package is-even has over 140k weekly downloads -
…profile of the author, the repository is still active on GitHub and there are active issues. [1] https://github.com/jonschlinkert/is-number
comment by Vilkku · 2021-11-16 · in NPM – "is-even", 160k weekly downloads -
> 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? -
…!== '') { 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 -
▲ 1
Is-Number Node Modulestory by thunderbong · 2020-06-08 · 1 comment