2 ms·
I would be with you, but leftpad was a thing. Anyone importing leftpad (or any of the similar 5-line dependencies) has no leg to stand on here. Yes, you should
by marcus_holmes 5y ago
I would be with you, but leftpad was a thing. Anyone importing leftpad (or any of the similar 5-line dependencies) has no leg to stand on here.
Yes, you should write leftpad in-house. Anything that is a copy-paste Stack Overflow answer should not be dependency.
- p-e-w 5y ago> Yes, you should write leftpad in-house. No, you shouldn't. You should use a platform that has basic operations like left-padding a string built in, instead of forcing you to re-invent the wheel or rely on random third-party implementations. NodeJS itself is the problem, because JavaScript is a garbage language without a standard library. Any attempts to work around that are just putting lipstick on a pig.
- edgyquant 5y agoYou’re not wrong, I’ll admit, but if we judge everything by the most extreme examples we’d still be writing assembly and only mathematicians would be programmers. I’m sure there’s a universe where that’s the case, and I’m sure there’s a percentage of people here who wish that were the case, but I’d say the world is better off with separation of skill sets and I’d rather leave the writing of libraries to people who enjoy writing them and can do it well.