Re:NPM – "is-even", 160k weekly downloads
by cormacrelf on Tuesday November 16, 2021 @12:08PM
(#29243113)
The “Usage” section in the readme doesn’t even give you any information about how it behaves on inputs that aren’t numbers. I hope the is-odd package has some way of detecting whether the input is a number or not. Maybe other packages need this too!
[ Parent
| on HN ]
Re:NPM – "is-even", 160k weekly downloads
by slmjkdbtl on Tuesday November 16, 2021 @01:15PM
(#29244263)
You use the is-number package to check if something is a number. JavaScript packages do one thing and do it well.
Re:NPM – "is-even", 160k weekly downloads
by Farow on Tuesday November 16, 2021 @12:40PM
(#29243605)
It throws an error on empty or non-integer values: https://github.com/i-voted-for-trump/is-even/blob/master/tes...