3 ms·
...wow. I literally did not believe that until I clicked the link. JavaScript has gone too far.
by jasonhansel 7y ago
...wow. I literally did not believe that until I clicked the link. JavaScript has gone too far.
- iamleppert 7y agoThe problem is clearly due to vanity metrics like number of packages motivating people to publish an insane number of useless packages to fluff their contributions.
- inimino 7y agoThat is not clear.
- ivanfon 7y agoAgreed - I’ve found and been astonished by Github users who maintain hundreds of these little npm packages, all of which have usually under 10 lines of actual code, and sometimes even have chains of dependencies on the user’s other packages. It seems like the only reason these packages get any significant downloads is when one of them gets depended on by a big package, causing the entire dependency chain of the user’s little packages to be downloaded.
- fock 7y agowell, the rate-map at least includes a function: https://github.com/sindresorhus/shebang-regex https://github.com/sindresorhus/shebang-regex
- hu3 7y agoA dependency for /^#!(.*)/; With 8.6 mil downloads and 71 dependents... https://www.npmjs.com/package/shebang-regex https://www.npmjs.com/package/shebang-regex
- fock 7y agoand if you look closely, 70 of those dependents are just small-scale/bs packages and the only sensible real dependency is cross-spawn _via_ the shebang package (which applies this regex to a string). The whole ecosysten could use a purge of all those useless 1-line-requires (which were all introduced by helpful commits from the "i has 1337 downloads"-community), currently this is madness.
- tuananh 7y agosindresorhus is famous for that stuff :D
- vhakulinen 7y agoThis just made my day.
- arkh 7y agoI love the useless tests : https://github.com/sindresorhus/shebang-regex/blob/1cb5d4aee830d22e8222d7aa35315e91629a68c9/test.js https://github.com/sindresorhus/shebang-regex/blob/1cb5d4aee... You could replace the regexp with something matching everything and they would still pass.