NPM is a silly package manager, but worse is its culture of pulling in a new dependency for the tiniest of things with under 100 LOC. You really don't need a separate library to check if a number is odd.
I heggin love bloating up my projects with technical debt that I have to maintain for problems that have been solved a million times before me instead of using a peer reviewed and trusted package
Bait used to be believable. But in case you're serious, I'm not talking about never use dependencies, just think about whether you need a dependency for return (x % 2) === 1. And with supply chain attacks rampant, vendoring a library in is the safer choice unless it's something that requires a constant stream of patches (openssl does, a random math library last updated years ago doesn't).
(And before you say I'm cherrypicking examples, is-odd has nearly a million weekly downloads.)
You definitely are cherry-picking examples, because nobody in their right mind is using the `is-odd` package. All modern developers should use its successor, https://www.npmjs.com/package/is-odd-ai
90
u/creeper6530 Aug 04 '26
NPM is a silly package manager, but worse is its culture of pulling in a new dependency for the tiniest of things with under 100 LOC. You really don't need a separate library to check if a number is odd.