4 ms·
A bit also stems from the fact that NPM installs dependencies as trees. I.e., if you and two of your dependencies use is-odd, you will have three copies of it l
by Sebb767 6y ago
A bit also stems from the fact that NPM installs dependencies as trees. I.e., if you and two of your dependencies use is-odd, you will have three copies of it laying around, possibly in different version.
- berkes 6y agoAnd now I'm stuck wondering why anyone ever would need to release a new version of isOdd. Apparently isOdd had 6 releases. Does that mean that the previous 5 times they had "calculating if a number is odd" wrong?
- Sebb767 6y agoLooking at the commit history, they've mostly added checks for edge cases: https://github.com/jonschlinkert/is-odd/commits/master https://github.com/jonschlinkert/is-odd/commits/master Which is, to be fair, exactly the reason you'd use a library like this.
- berkes 6y ago> Which is, to be fair, exactly the reason you'd use a library like this. There is a crucial nuance here: Which is, to be fair, exactly the reason you'd use a library. With which I mean to emphasize that -indeed- libraries are crucial. But nano-libraries, like nano-services are an antipattern. This could be a stdlib (ideally), a bundle (like Lodash) or even a numberUtils. Having a gazillion packages that have a rediculous biolerplate-to-code ratio, contain just one (well evolved!) function and so on, is doing more harm than good. A library "like this" is harmful. If only because it gives people an argument, or just the idea that libraries are stupid and should be avoided.