3 ms·
Other way around, is-even depends on is-odd. But wait, there's more. Is even depends on is-number, so in the node.js world '515' is odd. It doesn't matter how
by flukus 9y ago
Other way around, is-even depends on is-odd. But wait, there's more. Is even depends on is-number, so in the node.js world '515' is odd.
It doesn't matter how good javascript compilers get when you throw this level of slop in.
- pluma 9y agoAs a JS dev, this actually offends me. I wouldn't expect a specialised package to silently convert strings to numbers. I think is-odd and friends are the aftermath of the microlibrary craze that followed the popularity of "toolbelt" libraries like jquery, underscore and lodash (which featured some equally inane methods but bundled them along with a load of far more complex helpers you wouldn't want to implement and maintain yourself).