$ bun run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js
Lodash在MIT许可下发布,支持现代环境。
查看构建差异并选择适合你的版本差异。
在浏览器中:
<script src="lodash.js"></script>
使用包子:
$ bun i lodash
在包子里:
// 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');
寻找用 ES6 或更小的捆绑包大小编写的 Lodash 模块?看看洛达什-es。
Lodash 通过消除处理数组、数字、对象、
字符串等的麻烦,使 JavaScript 变得更容易。Lodash的模块化方法非常适合:
Lodash有多种构建和模块格式。