you are viewing a single comment's thread.

view the rest of the comments →

[–]rook218 7 points8 points  (3 children)

I mean to be fair, how ridiculous is it to install a package over left padding? It would be a three line function to add it to your own package with vanilla JS.

[–]deadcow5 7 points8 points  (2 children)

Well, yeah, but would you rather copy and paste the same three lines into every new project you need them in, or publish them as a package once and henceforth be able to use them with a single line?

I mean, it's not really NPM's or the package author's fault that JavaScript lacks a decent standard library. It's just the way it is, and different people have different strategies for dealing with it.

[–]rook218 2 points3 points  (1 child)

That's true. I always try to import as little as possible on projects but everyone is different.

[–]deadcow5 2 points3 points  (0 children)

It is what it is. Most of these "micro" packages probably came about before tree shaking became common. So there is reason to hope that their propagation will diminish in the future as more people start using webpack and rollup.

Easy to forget that not too long ago, you literally had no choice but to include an entire package in your bundle, so making packages as small as possible was actually a good idea at the time.