3 ms·
There are packages which roll these up. Lodash is popular. But there's a philosophy and mindset in JS which is relatively unique to other languages which is to
by mikeryan 11y ago
There are packages which roll these up. Lodash is popular.
But there's a philosophy and mindset in JS which is relatively unique to other languages which is to optimize for download size to the browser (noting in another comment, tree shaking its not entirely yet "a thing"). Users don't want to include all of Lodash (or a stdlib) in their download package to just use _.isArray. Now Lodash does also provide the ability to use subpackages specific to a function (lodash.isArray) can be loaded as an independent package to mitigate that download hit but its relatively unique in that sense.
- the_mitsuhiko 11y agoI find tree shaking a much better solution for that issue.