3 ms·
If the 25KB are packaged with each library you add to your webpage, + ads , + analytics then maybe. One often doesn't need lodash. In fact, the only methods on
by spriggan3 10y ago
If the 25KB are packaged with each library you add to your webpage, + ads , + analytics then maybe.
One often doesn't need lodash. In fact, the only methods one does need are Object.keys to get the keys of an object and Array.prototype.reduce to iterate over an array, 90% of the time.
But yes, difference, zip, chunk, assign... are semantic and make for cleaner code. And yes flatten, xor are non trivial to implement, and the code one doesn't write is the code one doesn't have to test if already tested.
Of course, the best solution would be for the ECMA spec to implement most of lodash methods. I would also like to see an official way to curry, the same way Function.bind allows partial application.