# @elastic/lodash 中文文档

规范地址：https://npmcn.com/package/%40elastic/lodash/

版本：3\.10\.1-kibana4
npm 元数据更新时间：2026-09-25T13:38:50.104Z
中文译文更新时间：2026-11-13T10:48:26.725Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40elastic/lodash
原文对照：https://npmcn.com/package/%40elastic/lodash/?lang=original
项目主页：https://lodash.com/
源码仓库：https://github.com/elastic/lodash

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：845 kB，424 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- 运行依赖：0 个
- 首次发布：2018-09-24T14:26:57.855Z
- 最新版本发布：2020-01-13T22:03:19.387Z
- 近 30 天下载量：12726（2026-10-14 至 2026-11-12，npm 官方下载统计）
- 已发布版本数：4（近 12 个月 0 个）

## 中文简介

罗达什模块化公用事业的现代建设.

## 安装

```sh
npm install @elastic/lodash
```

也可以使用：`pnpm add @elastic/lodash`、`yarn add @elastic/lodash`、`bun add @elastic/lodash`

## README

# 这是在基巴纳内部使用的临时防腐剂

# 罗达什 v3.10.1

这个 [现代建筑](https://github.com/lodash/lodash/wiki/Build-Differences) 联 合 国 [摇篮](https://lodash.com/) 导出为 [节点.js](http://nodejs.org/)编号 :[i.js (英语)](https://iojs.org/) 模块.

使用 [摇篮- cli](https://www.npmjs.com/package/lodash-cli)数字 :

```bash
$ lodash modularize modern exports=node -o ./
$ lodash modern -d -o ./index.js
```

## 安装

使用 npm :

```bash
$ {sudo -H} npm i -g npm
$ npm i --save lodash
```

在节点/io.js中:

```js
// load the modern build
var _ = require('lodash');
// or a method category
var array = require('lodash/array');
// or a method (great for smaller builds with browserify/webpack)
var chunk = require('lodash/array/chunk');
```

见 [软件包源](https://github.com/lodash/lodash/tree/3.10.1-npm) 更多细节.

**说明:**  
不指定值 [特殊变量](http://nodejs.org/api/repl.html#repl_repl_features) `_` 当在反应中.  
安装 [无](https://www.npmjs.com/package/n_) 用于默认包括摇篮的REPL.

## 模块格式

lodash还以各种其他构建和模块格式提供.

-   npm 软件包 [现代](https://www.npmjs.com/package/lodash), (中文(简体) ), [兼容性](https://www.npmjs.com/package/lodash-compat),并 [每种方法](https://www.npmjs.com/browse/keyword/lodash-modularized) 正在建设
-   AMD 模块 [现代](https://github.com/lodash/lodash/tree/3.10.1-amd) 打开 [兼容性](https://github.com/lodash/lodash-compat/tree/3.10.1-amd) 正在建设
-   用于 [现代](https://github.com/lodash/lodash/tree/3.10.1-es) 构建

## 进一步阅读

-   [API 文档](https://lodash.com/docs)
-   [构建差异](https://github.com/lodash/lodash/wiki/Build-Differences)
-   [更改日志](https://github.com/lodash/lodash/wiki/Changelog)
-   [路线图](https://github.com/lodash/lodash/wiki/Roadmap)
-   [更多资源](https://github.com/lodash/lodash/wiki/Resources)

## 特征

-   ~100%(%) [代码覆盖](https://coveralls.io/r/lodash)
-   跟着 [语义版本](http://semver.org/) 释放
-   [评估不足](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) 连锁
-   [(...) (简体中文)](https://lodash.com/docs#_) 支持隐性链条
-   [.ary 时间](https://lodash.com/docs#ary) 打开 [. rearg 读取](https://lodash.com/docs#rearg) 更改函数参数限制和顺序
-   [.at 时](https://lodash.com/docs#at) 用于选择樱桃收藏值
-   [. 尝试](https://lodash.com/docs#attempt) 以执行在不尝试捕获的情况下可能出错的函数
-   [. 在此之前](https://lodash.com/docs#before) 补充 [. 之后](https://lodash.com/docs#after)
-   [. 宾德基](https://lodash.com/docs#bindKey) 用于约束 [_“懒惰”_](http://michaux.ca/articles/lazy-function-definition-pattern) 定义的方法
-   [. 圆](https://lodash.com/docs#chunk) 用于将数组分割成特定大小的块
-   [. cloone (中文(简体) )](https://lodash.com/docs#clone) 支持浅克隆 `Date` 打开 `RegExp` 对象
-   [. clone 深处](https://lodash.com/docs#cloneDeep) 深克隆阵列和对象
-   [. е翴](https://lodash.com/docs#curry) 打开 [.curry右转](https://lodash.com/docs#curryRight) 用于创建 [剪辑](http://hughfdjackson.com/javascript/why-curry-helps/) 函数
-   [. 弹出](https://lodash.com/docs#debounce) 打开 [. 喉咙](https://lodash.com/docs#throttle) 正在取消更多控件的选项( a)
-   [. 默认深度](https://lodash.com/docs#defaultsDeep) 用于递归指定默认属性
-   [. 填补](https://lodash.com/docs#fill) 以数值填充数组
-   [. 找到关键](https://lodash.com/docs#findKey) 用于查找密钥
-   [. 流量](https://lodash.com/docs#flow) 补充 [. 向右移动](https://lodash.com/docs#flowRight) (单位:千美元) `_.compose`(中文(简体) )
-   [. 每个](https://lodash.com/docs#forEach) 支持提早退出
-   [. for in (中文(简体) )](https://lodash.com/docs#forIn) 用于移动所有可配置属性
-   [. forOwn (英语)](https://lodash.com/docs#forOwn) 用于浏览自己的属性
-   [获取(](https://lodash.com/docs#get) 打开 [. set (英语)](https://lodash.com/docs#set) 用于获取深层属性设置( s)
-   [.gt (韩语)](https://lodash.com/docs#gt), (中文(简体) ), [.gte (英语)](https://lodash.com/docs#gte), (中文(简体) ), [.lt 时](https://lodash.com/docs#lt),并 [.lte (简体中文)](https://lodash.com/docs#lte) 关系方法
-   [. 在距离内](https://lodash.com/docs#inRange) 用于检查数字是否在指定范围内
-   [. 性质](https://lodash.com/docs#isNative) 检查本地函数
-   [. 正在打印对象](https://lodash.com/docs#isPlainObject) 打开 [. to Plain 对象](https://lodash.com/docs#toPlainObject) 检查转换为( c) `Object` 对象
-   [. is Typed 箭头](https://lodash.com/docs#isTypedArray) 以检查输入的数组
-   [. 地图键](https://lodash.com/docs#mapKeys) 用于映射对象的密钥
-   [. 匹配](https://lodash.com/docs#matches) 支持深对象比较
-   [.matches 财产](https://lodash.com/docs#matchesProperty) 补充 [. 匹配](https://lodash.com/docs#matches) 打开 [. 财产](https://lodash.com/docs#property)
-   [. 出现](https://lodash.com/docs#merge) 一个深处 [. 扩展](https://lodash.com/docs#extend)
-   [. 方法](https://lodash.com/docs#method) 打开 [. 方法](https://lodash.com/docs#methodOf) 以创建引用方法的函数
-   [. modArgs (缩写)](https://lodash.com/docs#modArgs) 更高级的职能构成
-   [. parseInt (英语)](https://lodash.com/docs#parseInt) 为一致的跨环境行为
-   [.pull (中文(简体) )](https://lodash.com/docs#pull), (中文(简体) ), [.pullAt (中文(简体) )](https://lodash.com/docs#pullAt),并 [. 移动](https://lodash.com/docs#remove) 用于变异数组
-   [. 随机](https://lodash.com/docs#random) 支持返回浮点数
-   [.restParam 时间轴](https://lodash.com/docs#restParam) 打开 [. 传播](https://lodash.com/docs#spread) 用于应用休息参数和向函数扩展参数
-   [. 运行内文](https://lodash.com/docs#runInContext) 用于无相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相取相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相
-   [. slice 语句](https://lodash.com/docs#slice) 用于创建类似数组的子集
-   [.sortByall(所有类型)](https://lodash.com/docs#sortByAll) 打开 [. 排序](https://lodash.com/docs#sortByOrder) 以多个属性和命令排序
-   [. 支持](https://lodash.com/docs#support) 标志性环境特征
-   [.template 时](https://lodash.com/docs#template) 支持 [_“进口”_](https://lodash.com/docs#templateSettings-imports) 选项( t) [ES 模板分隔符](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components)
-   [. 转换](https://lodash.com/docs#transform) 作为替代 [. 减少](https://lodash.com/docs#reduce) 用于转换对象
-   [.unzip 与 (中文)](https://lodash.com/docs#unzipWith) 打开 [.zip 带](https://lodash.com/docs#zipWith) 指定如何组合组合的数值
-   [. 数值 单位](https://lodash.com/docs#valuesIn) 用于获取所有可假设属性的值
-   [.xor (韩语)](https://lodash.com/docs#xor) 补充 [. 差异](https://lodash.com/docs#difference), (中文(简体) ), [. 接口](https://lodash.com/docs#intersection),并 [. 工会](https://lodash.com/docs#union)
-   [添加( .)](https://lodash.com/docs#add), (中文(简体) ), [. 圆形](https://lodash.com/docs#round), (中文(简体) ), [.和](https://lodash.com/docs#sum),并 [更多](https://lodash.com/docs "_.ceil & _.floor") 数学方法
-   [. bind (缩写)](https://lodash.com/docs#bind), (中文(简体) ), [. е翴](https://lodash.com/docs#curry), (中文(简体) ), [. 部分内容](https://lodash.com/docs#partial),并 [更多](https://lodash.com/docs "_.bindKey, _.curryRight, _.partialRight") 支持自定义参数占位符
-   [. 资本化](https://lodash.com/docs#capitalize), (中文(简体) ), [.trim 时](https://lodash.com/docs#trim),并 [更多](https://lodash.com/docs "_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words") 字符串方法
-   [. cloone (中文(简体) )](https://lodash.com/docs#clone), (中文(简体) ), [.是平等的](https://lodash.com/docs#isEqual),并 [更多](https://lodash.com/docs "_.assign, _.cloneDeep, _.merge") 接受自定义器调用
-   [. 放下时](https://lodash.com/docs#dropWhile), (中文(简体) ), [. . 同时](https://lodash.com/docs#takeWhile),并 [更多](https://lodash.com/docs "_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile") 补充 [. 第一个](https://lodash.com/docs#first), (中文(简体) ), [. 初始状态](https://lodash.com/docs#initial), (中文(简体) ), [最后一个](https://lodash.com/docs#last),并 [. 暂停](https://lodash.com/docs#rest)
-   [. 找到最后一个](https://lodash.com/docs#findLast), (中文(简体) ), [. find Last Key 键](https://lodash.com/docs#findLastKey),并 [更多](https://lodash.com/docs "_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile") 权利联系方法
-   [. 包括](https://lodash.com/docs#includes), (中文(简体) ), [. to (简体中文) 阵列](https://lodash.com/docs#toArray),并 [更多](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where") 接受字符串
-   [承诺](https://lodash.com/docs#prototype-commit) 打开 [工厂](https://lodash.com/docs#prototype-plant) 用于使用链序列的工作
-   [兹鲁](https://lodash.com/docs#thru) 以传递值为链条序列

## 支助

在Chrome 43-44,Firefox 38-39, IE 6-11,MS Edge,Safari 5-8,ChakraNode 01.2,io.js 2.5.0,Node.js 0.8.28,0.10.40,和0.12.7,PhantomJS 1.9.8,RingoJS 0.11,和Rhino 1.7.6测试. 自动 [浏览器](https://saucelabs.com/u/lodash) 打开 [中情局](https://travis-ci.org/lodash/lodash/) 测试运行可用 。 特别感谢 [苏塞实验室](https://saucelabs.com/) 用于提供自动浏览器测试.

## 常见问题

### @elastic/lodash 是什么？

罗达什模块化公用事业的现代建设\.

### 如何安装 @elastic/lodash？

在项目目录运行 npm install @elastic/lodash，或使用 pnpm add / yarn add / bun add。

### @elastic/lodash 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/elastic\_\_lodash 是否存在。

### @elastic/lodash 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @elastic/lodash 可以商用吗？

@elastic/lodash 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @elastic/lodash 的下载量有多少？

根据 npm 官方下载统计，@elastic/lodash 在 2026/10/14 – 2026/11/12 这 30 天内被下载 12,726 次，日均约 424 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @elastic/lodash 还在维护吗？

最新版本 3\.10\.1-kibana4 发布于 2020/01/14（6 年前）；至今共发布 4 个版本，其中过去 12 个月发布了 0 个；首次发布于 2018/09/24。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

