Lodash has many features that underscore does not have. Also, I am told that Lodash has been implemented in such a way that functions are largely independent of each other so that you can build a custom lodash package that only includes the subset that you use.
In practice, I'm not sure how truly valuable this is... it's far easier to just accept it as a whole, and with min/merge versions in the browser it's not so big at all.
It's not a macro framework like jQuery... the kitchen sink isn't in there... though, I do think that probably the string templating could/should become a sub-module... the rest belong together more.
Heres a breakdown of the differences between the two : http://benmccormick.org/2014/11/12/underscore-vs-lodash/
A few months old but should still be reasonably accurate
It's both terrifying and exciting that you have to specifically point out when something is as little as "a few months old" when it comes to JS frameworks/libraries.
6 months is a very long time in terms of development cycle.
One of the core differences between Lodash - iirc - is that Underscore will just use a browser's built-in version of functions like .map and such, while Lodash often implements them themselves - circumventing JS spec compliance, often with significantly better performance than native implementations.
> circumventing JS spec compliance, often with significantly better performance than native implementations.
Yes Lodash has some interesting 'better than native' optimizations that utilize JIT compilation
In addition to other comments, optimization sometimes means inlining code. Lodash has always been performance first.
lodash is consistency and compatibility first.
Never knew that before. Does Lodash have more features than Underscore? I never got too heavy into using either but I always thought of them as essentially being interchangeable libraries.