The Npm Install Culture
There’s a npm package for that.
Oh man this gets tiring. Especially when the packages are < 100 lines. Are web devs forgetting how to program? Check out the whole shit storm of the left-pad
npm package being removed last year - that package was 11 lines of code:
module.exports = leftpad;
function leftpad (str, len, ch) {
str = String(str);
var i = -1;
if (!ch && ch !== 0) ch = ' ';
len = len - str.length;
while (++i < len) {
str = ch + str;
}
return str;
}