3 ms·
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 w
by cormacrelf 5y ago
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!
isEven(0);
//=> true
isEven('1');
//=> false
isEven(2);
//=> true
isEven('3');
//=> false
- Farow 5y agoIt throws an error on empty or non-integer values: https://github.com/i-voted-for-trump/is-even/blob/master/test.js#L29 https://github.com/i-voted-for-trump/is-even/blob/master/tes...
- slmjkdbtl 5y agoYou use the is-number package to check if something is a number. JavaScript packages do one thing and do it well.