Lodash

A modern JavaScript utility library delivering modularity, performance, & e...

README

lodash



The Lodash library exported as a UMD module.

Generated using lodash-cli:
  1. ``` sh
  2. $ npm run build
  3. $ lodash -o ./dist/lodash.js
  4. $ lodash core -o ./dist/lodash.core.js
  5. ```

Download



Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/LICENSE) & supports modern environments.
Review the build differences & pick one that’s right for you.

Installation


In a browser:
  1. ``` html
  2. <script src="lodash.js"></script>
  3. ```

Using npm:
  1. ``` sh
  2. $ npm i -g npm
  3. $ npm i lodash
  4. ```
Note: add --save if you are using npm < 5.0.0

In Node.js:
  1. ``` js
  2. // Load the full build.
  3. var _ = require('lodash');
  4. // Load the core build.
  5. var _ = require('lodash/core');
  6. // Load the FP build for immutable auto-curried iteratee-first data-last methods.
  7. var fp = require('lodash/fp');

  8. // Load method categories.
  9. var array = require('lodash/array');
  10. var object = require('lodash/fp/object');

  11. // Cherry-pick methods for smaller browserify/rollup/webpack bundles.
  12. var at = require('lodash/at');
  13. var curryN = require('lodash/fp/curryN');
  14. ```

Looking for Lodash modules written in ES6 or smaller bundle sizes? Check out lodash-es.

Why Lodash?


Lodash makes JavaScript easier by taking the hassle out of working with arrays,
numbers, objects, strings, etc. Lodash’s modular methods are great for:

Iterating arrays, objects, & strings
Manipulating & testing values
Creating composite functions

Module Formats


Lodash is available in a variety of builds & module formats.