DEV Community

Discussion on: Why is Lodash Still Useful?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

but you should be conscientious about the implications.

This.

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.)

Collapse
 
lexlohr profile image
Alex Lohr

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.

Thread Thread
 
aumayeung profile image
John Au-Yeung

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

Collapse
 
aumayeung profile image
John Au-Yeung

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