3 ms·
That’s a great example! 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
by styfle 6y ago
That’s a great example!
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.
https://packagephobia.com/result?p=request https://packagephobia.com/result?p=request
https://packagephobia.com/result?p=jest https://packagephobia.com/result?p=jest