lodash v4.17.4

Site | Docs | FP Guide | Contributing | Wiki | Code of Conduct | Twitter | Chat

The Lodash library exported as a UMD module.

Generated using lodash-cli:

$ npm run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js

Download

Lodash is released under the MIT license & supports modern environments.
Review the build differences & pick one that’s right for you.

Installation

In a browser:

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

Using npm:

$ npm i -g npm
$ npm i --save lodash

In Node.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 method categories.
var array = require('lodash/array');
var object = require('lodash/fp/object');

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

Note:
Install n_ for Lodash use in the Node.js < 6 REPL.

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.



lodash v4.17.4

网站 | 文档 | FP指南 | 贡献 | Wiki | 行为准则 | Twitter | 聊天

Lodash 库作为 UMD 模块。

使用 lodash-cli 生成

$ npm run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js

下载

Lodash根据麻省理工学院许可证&amp;支持现代环境 查看构建差异和选择一个适合你的。

安装

在浏览器中:

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

使用npm:

$ npm i -g npm
$ npm i –save lodash

在Node.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 method categories. var array = require('lodash/array'); var object = require('lodash/fp/object');

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

注意:
安装 n_ 在Node.js&lt; 6 REPL。

为什么选择Lodash?

通过将数组中的麻烦放在一起,Lodash使JavaScript变得更容易, 数字,对象,字符串等。Lodash的模块化方法适用于:

  • 迭代数组,对象,&amp;字符串
  • 操纵&amp;测试值
  • 创建复合函数

模块格式

可以在各种版本&amp;模块格式。




相关问题推荐