by styfle · 6y ago · 0 comments
One such metric I found to be missing for npm dependencies was the install size, which is why I created https://packagephobia.com
We need more tools to help make this decision because its easy to add a new dependency but its often hard to remove a dependency.
You looked at the size and determined that it might not be worth bringing on a small dependency when you can implement it yourself (or rather use String.prototype.padStart).
It’s not just size alone but size of transitive dependencies.
Both examples you gave don’t have any dependencies (the publish size matches the install size).
Take a look at some popular dependencies like request or jest and notice the number of transitive dependencies.