|
|
|
|
|
by simoncion
3747 days ago
|
|
> First, you should never have a dependency for 15 lines. If those 15 lines are called throughout your codebase, you should do what? Re-write the 15 lines and stuff them into a lib that you maintain? And everyone else should do this, too? If a library is widely useful, it's widely useful regardless of how many LOC it contains. |
|
Many times it is even faster to write a trivial "module" yourself than even discover it on npm, let alone reading and verifying it. Hell, NPM 3.x is so slow that it's literally faster to write any 1 liner "module" than it is just to install it.
"Reuse" is just a means to an end, it doesn't make sense to do it only for its own sake.