Re:Following the Unix philosophy without getting left-pad
by amadeuspagel on Thursday November 10, 2022 @04:53PM
(#33553979)
The only problem with left-pad was that NPM let people delete packages that other packages depend on. That's literally it.
[ Parent
| on HN ]
Re:Following the Unix philosophy without getting left-pad
by crznp on Thursday November 10, 2022 @06:18PM
(#33555044)
I need a test runner, so I install "karma" and therefore "braces" and "fill-range" and "to-regex-range" and "is-number" and 100 other things.
Dependencies come with risk and cognitive load: deleted like left-pad or loaded with malware like ua-parser-js. Sometimes that is worth it. But if you need 10 lines to pad a string or validate a number, copy some code off of stack overflow like a real developer. Nobody has to know.