|
|
|
|
|
by kllrnohj
2262 days ago
|
|
> I get "trying to stay vanilla", but any reasonably-common snippet should either be installed from npm or published there. And that's how you end up with the joke that was left-pad and the broken internet that resulted when the author yanked it. Dependencies represent a real risk to your product. If it is actually a simple snippet, you shouldn't take that as an NPM dependency - the risk/reward ratio is just way out of whack with that. |
|
Instead of adding a file to your “libs” folder you add a line to package.json
Any code that isn’t in my repo is code I don’t have to maintain.
Left pad can’t happen anymore (for 4 years now) and if you don’t know that you’re either lying or outdated (like those files in your libs folder)