Skip to content

re: Why is Lodash Still Useful? VIEW POST

re: To do the same with ES methods, just the first two examples: _.times // import * as _ from "lodash"; const getRandomInteger = () =&gt...

but you should be conscientious about the implications.


It makes me unsure if I should use lodash.clonedeep or lodash.merge... If I write it myself, I can be sure of the implications.

Also, lodash is too magical and too widely accepting in some methods, such as lodash.filter. (I saw a lot in lowdb.)


A very nice example is _.isEmpty(): in most cases, you are testing if an object has no enumerable keys. You'll rarely need to check at the same time if the length of an array or a string is zero, but lodash will (needlessly in the stated case) check the input for all available types.

This is one of the ones that we can implement ourselves without much effort.


I think the array's built-in filter method is pretty good so I never want to use the Lodash version.

code of conduct - report abuse