3 ms·
map and filter are already builtins anyway, so it's kind of a moot point. It sure is confusing why the author implemented these functions...
by madeofpalk 10y ago
map and filter are already builtins anyway, so it's kind of a moot point.
It sure is confusing why the author implemented these functions...
- nilliams 10y agoCross-browser usage? Map and filter aren't in IE8, which is still in wider use than a lot of people would like to pretend.
- madeofpalk 10y agoWell, what browsers you support is obviously going to depend strongly on your particular site and use case. I work on a consumer-facing site for a national broadcaster which sets very aggressive browser support (oldest IE we support is IE11) which works fine for us. Regardless, any sort of environment where you can do `import extend from 'just-extend';` is going to (have a way) support map and filter.
- nilliams 10y ago>> Regardless, any sort of environment where you can do `import extend from 'just-extend';` is going to (have a way) support map and filter. That is not true for the now-fairly-common use case that browserify/webpack satisfy. I write code with ES6 module syntax and build with browserify (& babelify) to target the browser. But I still need to pull in modules like lodash.map/lodash.filter if I want to target IE8. (I could use es5-shim but that makes for less portable code).