Hi, this is a question.
So what is the difference between CoreJS and Lodash? Why do I need yet another "standard library for JavaScript"? When should I choose core-js over lodash ?
Because stackoverflow doesn't like the question like this so I am asking the question here.
Thanks!
core-js is a polyfill for ECMAScript features, for example Array.prototype.flat or Map. You can already find these features in most modern browsers, and core-js gives you the possibility to use them in older browsers.
lodash is a set of utility functions. They are based on standard JavaScript features, but have nothing to do with the standard language.
The difference between core-js and lodash is the same as the difference between document.querySelector and jQuery.
Most helpful comment
core-jsis a polyfill for ECMAScript features, for exampleArray.prototype.flatorMap. You can already find these features in most modern browsers, andcore-jsgives you the possibility to use them in older browsers.lodashis a set of utility functions. They are based on standard JavaScript features, but have nothing to do with the standard language.The difference between
core-jsandlodashis the same as the difference betweendocument.querySelectorandjQuery.