5 ms·
I thought it was a joke your is-odd comment. But no it is at version 3.0.1 and has 2.1 million downloads a month[0]... And it has a dependency to is-number. Wit
by ta988 5y ago
I thought it was a joke your is-odd comment. But no it is at version 3.0.1 and has 2.1 million downloads a month[0]... And it has a dependency to is-number. With the performance of today's tree shaking systems I wonder why there is not a simple math lib.
[0] https://www.npmjs.com/package/is-odd https://www.npmjs.com/package/is-odd
- tomxor 5y agoIt's pretty crazy. For whatever reason there is a substantial culture around NPM usage of preferring to depend on lots of trivial packages, over writing simple inline equivalents. And it's recursive, which can mean depending on what seems to be a modest but useful package at the top of that hierarchy ends up pulling down 10k packages. I think this makes it easier to acquire an inflated sense of importance when an authors package reaches popularity - most of the small packages have some value and aren't as ridiculously worthless as "is-odd"; yet they also don't embody anything particularly unique or difficult to replicate. > I wonder why there is not a simple math lib. There are some non-standard but comprehensive math libraries such as MathJS. Although I don't think "is-odd" could be attributed to an absence of standard math libraries.
- dudeinjapan 5y agoIn fairness to the OP he did optimize the hell out of his colorette lib, it's about 1/10th the size of the widely adopted chalk lib and performs way better. Back in the day I remember he was (rightly) complaining that the chalk author submitted PRs to get chalk used in as many libs as possible, while colorette (or whatever it was called--it has a different name before) was the technically superior solution to the problem.
- smoldesu 5y agoThen he should have made a PR, or at the very least retained the commit history to recognize the original programmer's work. That's non-negotiable, because commit history can be essential to understanding breakage in mature libraries. The fact that anyone would feel comfortable erasing it leads me to believe there's an ulterior motive.
- honzzz 5y agoIf I understand correctly, the parent is talking about the original author of the library, not the person who forked it.
- dudeinjapan 5y agoYes, this is correct, I was referring to colorette's maintainer. Sorry for confusion.
- iaml 5y ago> I wonder why there is not a simple math lib This [0] might be what you are looking for, it has both is-number and is-odd. [0] https://github.com/stdlib-js/stdlib https://github.com/stdlib-js/stdlib
- zkldi 5y agoFor what it's worth, this is also all the work of one person who spammed NPM with micropackages to boost his download counts. This meme attacking `npm` for nonsense like `is-odd` is quite literally the result of one person resume boosting. For every one thing, he broke it down into as many possible packages as possible, and all of his packages depend on 20 more of his packages. It's like a fractal of resume boosting. https://github.com/jonschlinkert/info-symbol https://github.com/jonschlinkert/info-symbol https://github.com/jonschlinkert/success-symbol https://github.com/jonschlinkert/success-symbol https://github.com/jonschlinkert/warning-symbol https://github.com/jonschlinkert/warning-symbol https://github.com/jonschlinkert/error-symbol https://github.com/jonschlinkert/error-symbol My personal favourite is making every single ansi colour into a separate package, and then making `ansi-colors` which depends on all of them, and all of these packages are just a single function call with a provided number. It's honestly insane. https://github.com/jonschlinkert/ansi-black https://github.com/jonschlinkert/ansi-black https://github.com/jonschlinkert/ansi-reset https://github.com/jonschlinkert/ansi-reset https://github.com/jonschlinkert/ansi-bold https://github.com/jonschlinkert/ansi-bold https://github.com/jonschlinkert/ansi-dim https://github.com/jonschlinkert/ansi-dim https://github.com/jonschlinkert/ansi-italic https://github.com/jonschlinkert/ansi-italic https://github.com/jonschlinkert/ansi-underline https://github.com/jonschlinkert/ansi-underline https://github.com/jonschlinkert/ansi-inverse https://github.com/jonschlinkert/ansi-inverse https://github.com/jonschlinkert/ansi-hidden https://github.com/jonschlinkert/ansi-hidden https://github.com/jonschlinkert/ansi-strikethrough https://github.com/jonschlinkert/ansi-strikethrough https://github.com/jonschlinkert/ansi-black https://github.com/jonschlinkert/ansi-black https://github.com/jonschlinkert/ansi-red https://github.com/jonschlinkert/ansi-red https://github.com/jonschlinkert/ansi-green https://github.com/jonschlinkert/ansi-green https://github.com/jonschlinkert/ansi-yellow https://github.com/jonschlinkert/ansi-yellow https://github.com/jonschlinkert/ansi-blue https://github.com/jonschlinkert/ansi-blue https://github.com/jonschlinkert/ansi-magenta https://github.com/jonschlinkert/ansi-magenta https://github.com/jonschlinkert/ansi-cyan https://github.com/jonschlinkert/ansi-cyan https://github.com/jonschlinkert/ansi-white https://github.com/jonschlinkert/ansi-white https://github.com/jonschlinkert/ansi-gray https://github.com/jonschlinkert/ansi-gray https://github.com/jonschlinkert/ansi-grey https://github.com/jonschlinkert/ansi-grey https://github.com/jonschlinkert/ansi-bgblack https://github.com/jonschlinkert/ansi-bgblack https://github.com/jonschlinkert/ansi-bgred https://github.com/jonschlinkert/ansi-bgred https://github.com/jonschlinkert/ansi-bggreen https://github.com/jonschlinkert/ansi-bggreen https://github.com/jonschlinkert/ansi-bgyellow https://github.com/jonschlinkert/ansi-bgyellow https://github.com/jonschlinkert/ansi-bgblue https://github.com/jonschlinkert/ansi-bgblue https://github.com/jonschlinkert/ansi-bgmagenta https://github.com/jonschlinkert/ansi-bgmagenta https://github.com/jonschlinkert/ansi-bgcyan https://github.com/jonschlinkert/ansi-bgcyan https://github.com/jonschlinkert/ansi-bgwhite https://github.com/jonschlinkert/ansi-bgwhite