Lodash, like jQuery, Mootools or Rxjs are toolboxes. While using ES6 much of the functionality that Lodash offers needs many lines of code to implement and Lodash ensures tested tools in production scenario, this is very important.
Your fear of importing a giant dependency is not correct. Lodash allows you to import only the tools you need using the syntax:
import clamp from 'lodash/clamp';
import toInteger from 'lodash/toInteger';
I use it a lot debounce
for example, if you were to write this function alone you would have to test it and it would not be short in the first iterations.
Having said that it is clear that it is important to always reduce the number of external dependencies. If you don’t need Lodash, or what you need is easy and safe to do with homemade tools then go in that direction.
"Homemade tools" here in Brazil sometimes have a slightly negative connotation, depending on the region, suggesting that maybe it is "precarious", I do not know if it is the intention. Maybe "own tools" are more neutral (but it even goes from intention - no problem in your sentence, just wanted to mention - after I delete the comment)
– Bacco
@Bacco good, I didn’t know this difference. Own tools in the sense of not public is what I meant.
– Sergio