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.
It makes me unsure if I should use
lodash.clonedeep
orlodash.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.