diff --git a/README.md b/README.md index 954b57bcb..ae9586cce 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,6 @@ [Twitter](https://twitter.com/bestiejs) | [Chat](https://gitter.im/lodash/lodash) -Lodash is distibuted through [npm](npmjs.com). To install it, run the following: - -```shell -$ npm i --save lodash -``` - The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module. Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): @@ -24,15 +18,50 @@ $ lodash -o ./dist/lodash.js $ lodash core -o ./dist/lodash.core.js ``` -## Installation - -Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.15.0/LICENSE) & supports [modern environments](#support).
-Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you. +## Download * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.core.min.js)) * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.js) ([~23 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.min.js)) * [CDN copies](https://www.jsdelivr.com/projects/lodash) +Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.15.0/LICENSE) & supports [modern environments](#support).
+Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you. + +## Installation + +In a browser: +```html + +``` + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the fp build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load a method category. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Load a single method for smaller builds with browserify/rollup/webpack. +var chunk = require('lodash/chunk'); +var extend = require('lodash/fp/extend') +``` + +**Note:**
+Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` in the Node.js < 6 REPL.
+Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes `lodash` by default. + ## Why Lodash? Lodash makes JavaScript easier by taking the hassle out of working with arrays,