var isOdd = require('is-odd');
module.exports = function isEven(i) {
return !isOdd(i);
};1) write actually useful package, get 10k weekly downloads
2) split out 100 utility functions and use them as dependencies
3) magic - your packages now have ~1M weekly downloads. You are now a JS superstar.
As for justification and usage I couldn't tell you, apparently it was only used once in that whole codebase anyway (also according to that thread).
[1] https://www.reddit.com/r/programming/comments/886zji/why_has...
What.... why.... the only concievable point of a package like this is that at least it does the kind of type-checking needed to compensate for JavaScripts weak typing system, but why do you need to check the type of String.length?! Do you really think it's going to start spitting anything other than a positive integer? Fucking hell....
These projects seem to have been created and promoted just to boost the author's "npm score" / package count. These micro-modules must cause more problems than they solve.
is-odd 831,460 weekly downloads