A drop-in replacement for Underscore.js that delivers performance improvements, bug fixes, and additional features.
JavaScript Other
Pull request Compare This branch is 2100 commits ahead, 7214 commits behind lodash:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
doc
perf
test
vendor
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE.txt
README.md
bower.json
component.json
index.js
lodash.js
package.json

README.md

Lo-Dash v2.2.1

A utility library delivering consistency, customization, performance, & extras.

Download

Check out our wiki for details over the differences between builds.

CDN copies are available on cdnjs & jsDelivr.
For smaller file sizes, create custom builds with only the features needed.
Love modules? We’ve got you covered with lodash-amd, lodash-es6, lodash-node, & npm packages per method.

Dive in

There’s plenty of documentation, unit tests, & benchmarks.
For a list of upcoming features, check out our roadmap.
The full changelog for this release is available on our wiki.

Features not in Underscore

Resources

  • Podcasts
  • Posts
  • Videos

For a list of other community created podcasts, posts, & videos please head on over to our wiki.

Support

Tested in Chrome 530, Firefox 225, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.8-0.10.21, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.

Installation & usage

In browsers:

<script src="lodash.js"></script>

Using npm:

npm i --save lodash

{sudo} npm i -g lodash
npm ln lodash

In Node.js & Ringo:

var _ = require('lodash');
// or as Underscore
var _ = require('lodash/dist/lodash.underscore');

Notes:

  • Don’t assign values to special variable _ when in the REPL
  • If Lo-Dash is installed globally, run npm ln lodash in your project’s root directory before requiring it
  • Node.js 0.10.8-0.10.11 have bugs preventing minified builds

In Rhino:

load('lodash.js');

In an AMD loader:

require({
  'packages': [
    { 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }
  ]
},
['lodash'], function(_) {
  console.log(_.VERSION);
});

Author

twitter/jdalton
John-David Dalton

Contributors

twitter/blainebublitz twitter/kitcambridge twitter/mathias
Blaine Bublitz Kit Cambridge Mathias Bynens