Lodash 简介 | Lodash中文文档 | Lodash中文网 跳到主要内容Lodash中文文档英文官网GitHub简介数组集合函数语言数学数字对象Seq字符串实用函数PropertiesMethods简介本页总览Lodash 是一个一致性、模块化、高性能的 JavaScript 实用工具库。Lodash 遵循 MIT 开源协议发布,并且支持最新的运行环境。 查看各个构件版本的区别并选择一个适合你的版本。安装浏览器环境:通过 npm:$ npm i -g npm$ npm i --save lodashNode.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');注意:如需在 Node.js < 6 的 REPL 环境中使用 Lodash,请安装 n_。为什么选择 Lodash ?Lodash 通过降低 array、number、objects、string 等等的使用难度从而让 JavaScript 变得更简单。 Lodash 的模块化方法 非常适用于:遍历 array、object 和 string对值进行操作和检测创建符合功能的函数模块格式Lodash 提供 多种构建方式 和模块格式。lodash & per method packageslodash-es, babel-plugin-lodash, & lodash-webpack-pluginlodash/fplodash-amd补充工具futil-js 是一套用来补足 lodash 的实用工具集。扩展阅读贡献版本说明Wiki(更新记录、路线图等)兼容性在 Chrome 74-75、Firefox 66-67、IE 11、Edge 18、Safari 11-12 和 Node.js 8-12 环境中测试通过。下一页_.chunk安装为什么选择 Lodash ?模块格式补充工具扩展阅读兼容性竞品es-toolkitUnderscore.js社区GitHub友链BootstrapTailwindCSSReactStyleXNext.jsNextraDocusaurusnpmYarnpnpmWebpackRollupParcelesbuildBiomeSveltePurgeCSSMDXMarkdownExpressFastifyKoaNestHonoPreactWebAssemblyDenoBunAxiosAlpine.jsEleventy(11ty)StrapiJSDocStylelintNunjucksCheerioAstroSQLite7-zip冀ICP备14002930号-5