At no point does the author of this article actually look at the is-number package, or discuss it's contents.
I don't know how to check if a Javascript object is a number. I've seen various "javascript == and === and types really weird" videos, so I think I'd be tempted to just use an 'is-number' package, to be really sure I'm getting it right.
So maybe the issue is that it's really hard to do basic things right in Javascript?
The answer to this in most other languages would be to design a "standard library", then everyone would import that package, and while they would have just as much code, it would come in less pieces.
Huh, is-number is indeed available in quite a few of my node projects. It imports another library "kindOf"... guess that support was needed as well.
Looking at it, the check might not be trivial in untyped JavaScript. Not sure which edge case this covers, so maybe you actually do need to know all the ins-and-outs of JavaScript to be sure that what you are dealing with is indeed a number.
I don't know how to check if a Javascript object is a number. I've seen various "javascript == and === and types really weird" videos, so I think I'd be tempted to just use an 'is-number' package, to be really sure I'm getting it right.
So maybe the issue is that it's really hard to do basic things right in Javascript?
The answer to this in most other languages would be to design a "standard library", then everyone would import that package, and while they would have just as much code, it would come in less pieces.