News for hackers. Stuff that matters.
Re:NPM package 'isarray' is downloaded 40M times a week by dmitriid on Sunday November 08, 2020 @10:28AM (#25026311)
1. This stems from JS having literally no stdlib or convenience functions to speak of.

2. Array.isArray was added to browsers in 2009-2011. The time when IE 6 was still alive and kicking. No idea when it was added to node

3. This package plugged a hole in the stdlib, so obviously people started using it

4. It does on thing, and does it well. Unix-way!

5. How is using it any different than having the same code in a 20000-line utils.js file that any project inevitably grows to have to plug holes in JS's libs?

Re:NPM package 'isarray' is downloaded 40M times a week by aPoCoMiLogin on Sunday November 08, 2020 @10:57AM (#25026558)
Array.isArray has been implemented in 1.3.16 of V8 [0] which was used in node 0.1.15! [1] doubt that someone even is using that old node.js this to me looks like 3rd-party packages that were added very long ago and the code was never updated.

- [0] https://chromium.googlesource.com/v8/v8/+/refs/tags/1.3.16

- [1] https://github.com/nodejs/node-v0.x-archive/blob/v0.1.15/Cha...

Re:NPM package 'isarray' is downloaded 40M times a week by ilkkao on Sunday November 08, 2020 @10:52AM (#25026502)
Native Array.isArray was added to IE9 and Chrome 5, meaning totally obsolete node v0.8 supports it. Hard to imagine who really needs the library in 2020.

https://caniuse.com/?search=isArray