Have ideas to improve npm?Join in the discussion! »

    lodash
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/lodash package

    2.2.1 • Public • Published

    Lo-Dash v2.2.1

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

    Download

    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-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

    • Posts
    • Videos

    Support

    Tested in Chrome 5~29, Firefox 2~24, IE 6-10, Opera 9.25~16, Safari 3-6, Node.js 0.6.8-0.10.20, 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

    Install

    npm i [email protected]

    Version

    2.2.1

    License

    MIT

    Homepage

    lodash.com/

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar