I created Lo-Dash to provide more consistent cross-environment iteration support for arrays, strings, objects, and
arguments objects1. It has since become a superset of Underscore, providing more consistent API behavior, more features (like AMD support, deep clone, and deep merge), more thorough documentation and unit tests (tests which run in Node, Ringo, Rhino, Narwhal, PhantomJS, and browsers), better overall performance and optimizations for large arrays/object iteration, and more flexibility with custom builds and template pre-compilation utilities.
Because Lo-Dash is updated more frequently than Underscore, a
lodash underscore build is provided to ensure compatibility with the latest stable version of Underscore.
At one point I was even given push access to Underscore, in part because Lo-Dash is responsible for raising more than 30 issues; landing bug fixes, new features, & perf gains in Underscore v1.4.x+.
In addition there are at least 3 Backbone boilerplates that include Lo-Dash by default and Lo-Dash is now mentioned in Backbone’s official documentation.
Check out Kit Cambridge's post, Say "Hello" to Lo-Dash, for a deeper breakdown on the differences between Lo-Dash and Underscore.
- Underscore has inconsistent support for arrays, strings, objects, and
argumentsobjects. In newer browsers, Underscore methods ignore holes in arrays, "Objects" methods iterate
argumentsobjects, strings are treated as array-like, and methods correctly iterate functions (ignoring their "prototype" property) and objects (iterating shadowed properties like "toString" and "valueOf"), while in older browsers they will not. Also, Underscore methods like
_.clonepreserve holes in arrays, while others like