mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Make the readme mimic the homepage more. [ci skip]
This commit is contained in:
49
README.md
49
README.md
@@ -9,12 +9,6 @@
|
|||||||
[Twitter](https://twitter.com/bestiejs) |
|
[Twitter](https://twitter.com/bestiejs) |
|
||||||
[Chat](https://gitter.im/lodash/lodash)
|
[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.
|
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):
|
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
|
$ lodash core -o ./dist/lodash.core.js
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installation
|
## Download
|
||||||
|
|
||||||
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.15.0/LICENSE) & supports [modern environments](#support).<br>
|
|
||||||
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you.
|
|
||||||
|
|
||||||
* [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))
|
* [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))
|
* [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)
|
* [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).<br>
|
||||||
|
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
In a browser:
|
||||||
|
```html
|
||||||
|
<script src="lodash.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
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:**<br>
|
||||||
|
Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` in the Node.js < 6 REPL.<br>
|
||||||
|
Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes `lodash` by default.
|
||||||
|
|
||||||
## Why Lodash?
|
## Why Lodash?
|
||||||
|
|
||||||
Lodash makes JavaScript easier by taking the hassle out of working with arrays,<br>
|
Lodash makes JavaScript easier by taking the hassle out of working with arrays,<br>
|
||||||
|
|||||||
Reference in New Issue
Block a user