A modern JavaScript utility library delivering modularity, performance & extras


Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects

Latest compatibility stable

Quality Example
Even more features

"The easiest solution is to just replace underscore.js with lodash which has even more features than the latest underscore.js"

from question "Can I Update Meteor Underscore package?"

More frequently

"Because lodash is updated more frequently than underscore.js a lodash underscore.js build is provided to ensure compatibility with the latest stable version of underscore.js"

from question "Differences between lodash and underscore"

Faster stunned simple

Quality Example

"I am stunned right now seeing a lodash performing 100-150 faster than underscore.js in even simple native functions such as array.every in chrome"

from question "Differences between lodash and underscore"

"If i remember correctly lodash argued they were faster than underscore.js because the use non-native functions for key operations"

from question "Efficiently rename/re-map javascript/json object keys within array of objects"

Better comment likely

Quality Example
Better solution

"Edit as pointed out in the comment lodash is likely to be a better solution than underscore.js"

from question "Combine / Extend two objects with condition"

Better version

"If you re open to using lodash which is a better version of underscore.js imo this can be expressed fairly simply using flattendeep on each element of your multi-dimensional array"

from question "Any easy way to merge, flattern and concat multiple multi-dimensional arrays in javascript in a certain way (right to left)?"


Quality Example
Faster implementation

"Lodash is another faster implementation of underscore.js that will provide a lot of utility methods for working wit arrays objects functions etc"

from question "Best practices and tools for a big, extendible worklight enterprise application"


"Given that this is 4 years old and lodash has more or less taken the place of underscore.js i thought i would share this solution using lodash"

from question "Merge two arrays of keys and values to an object using underscore"


"The solution from charliefl is approximately 100x faster than underscore.js depending on browser in this case and lodash being up to 2x faster than underscore.js"

from question "How to merge two arrays similar to underscore extend method for objects"


"Lodash is definitely not slower than underscore.js"

from question "Differences between lodash and underscore"


"I believe lodash is a better choice over underscore.js more details in this blog post"

from question "Javascript: creating an array out of another"

More modular

"Lodash is more modular than underscore.js underscore.js around 5kb lodash around 17kb but is generally lighter because you only include the specific modules you need"

from question "Best way of basically doing a `where` clause in Javascript?"

More convoluted

"Basically collections are things that implement some kind of iterable interface and they internally use the same iteration method though lodash source is a bit more convoluted than underscore.js"

from question "Lo-Dash, difference between array and collection"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0