When comparing Underscore.js vs lodash, the Slant community recommends lodash for most people. In the question“What are the best libraries for functional programming on Node.js?” lodash is ranked 3rd while Underscore.js is ranked 16th. The most important reason people chose lodash is:
Lots of devs know this well.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Wide variety of useful utility functions
Underscore comes with not just all the usual functional suspects, but all the tools you'll need to go back-and-forth between Object Oriented and Functional paradigms - dynamically create objects from lists and vice-versa, pull data from object fields, bind 'this', partially apply, chain functions, and more.
Pro Widely used
Underscore's popularity means that it's battle-hardened and ready for production use.
Pro Widely used
Lots of devs know this well.
Pro Is a compatible superset of the features of underscore
lodash fills in a lot of gaps in underscore, including many functions familiar to functional programmers, such as takeWhile
and dropWhile
, as well as useful utility functions like isPlainObject
.