4 ms·
Right, my bad! I forgot that left-pad wasn’t a CDN issue, but a removal from npm... I think the big problem with JavaScript isn’t necessarily npm, but JavaScrip
by colejohnson66 6y ago
Right, my bad! I forgot that left-pad wasn’t a CDN issue, but a removal from npm... I think the big problem with JavaScript isn’t necessarily npm, but JavaScript’s abysmally small standard library that leads to situations like left-pad. Including left-pad into your project is easier than searching how to do something that JS’ stdlib doesn’t have.
That doesn’t mean there aren’t dumb packages like `is-array`[0] that are nothing more than `Array.isArray` with a polyfill[1] for those working with Chrome 4 or earlier. Even IE9 has `Array.isArray` according to MDN![2] And that package somehow had 59,000 downloads this past week?!
[0]: https://www.npmjs.com/package/is-array https://www.npmjs.com/package/is-array
[1]: https://github.com/retrofox/is-array/blob/master/index.js https://github.com/retrofox/is-array/blob/master/index.js
[2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...