61,265
stars
+3
7,225
forks
826
watchers
1,662
prs
4,364
issues
4
releases
21
discussions
README
lodash v4.18.1
Site |
Docs |
FP Guide |
Contributing |
Wiki |
Code of Conduct |
Governance |
Twitter |
Chat
[!IMPORTANT]
As announced on the OpenJS Foundation blog, Lodash has received support from the Sovereign Tech Agency and will transition to the Feature-Complete maturity stage so that it remains stable, secure, and sustainable long-term. As part of this effort, Lodash is rebooting its governance. A draft charter will be published shortly. The upcoming Technical Steering Committee (TSC) is already at work. For transparency, its members are listed in GOVERNANCE.md.
The Lodash library exported as a UMD module.
Generated using lodash-cli:
shell
$ npm run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js
Download
Core build (~4 kB gzipped)
Full build (~24 kB gzipped)
CDN copies
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:
html
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 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');
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 & per method packages
lodash-es, babel-plugin-lodash, & lodash-webpack-plugin
lodash/fp
lodash-amdTop issues
#6106Update CVEs for Lodash.* per-method packages28 comments · 2026-02-12#5833Attempt structuredClone in cloneDeep before doing manual clone8 comments · 2024-03-18#6263baseUnset: __proto__ guard checks ownership on the root object, not the current node6 comments · 2026-07-25#6105`lodash/fp` pollutes native/global `Array.isArray` with `convert` property7 comments · 2026-02-06#5818Method `sumBy` returns string 7 comments · 2024-02-13#5750Unexpected behaviour of `camelCase`7 comments · 2023-10-10#6195_.invert and _invertBy removes key when _proto_ value6 comments · 2026-04-12#5740test failed on 0 != -06 comments · 2023-09-26
Discussions
#6174Bug introduced in in 4.18.03 comments · 2026-03-31#6085Suggestion: Split string into chunks0 comments · 2026-01-21#5930How to try out V5?2 comments · 2024-10-10#5920Tree Shaking with lodash-es in Vite doesnt work2 comments · 2024-09-09#5917What Does 'node_modules' Refer To In The Licence File?1 comments · 2024-08-27#5902_.template feature is not working when moving from offline to online0 comments · 2024-07-15#5895[QUESTION]: isEqual and mongodb ObjectId1 comments · 2024-06-29#5885Unable to find the omit.ts file in 'src' folder1 comments · 2024-06-12
Latest release
4.18.1 4.18.1 2026-04-01Bugs Fixes a ReferenceError issue in lodash lodash-es lodash-amd and lodash.template when using the template and fromPairs functions from the modular builds. See https://github.com/lodash/lodash/issues/6167issuecomment-4165269769 These defects were related to how lodash distributions are built from the main branch using https://github.com/lodash-archive/lodash-cli. When internal dependencies change inside lodash functions, equivalent updates need to be made to a mapping in the lodash-cli. (hey, it was ahead of its time once upon a time!). We know this, but we missed it in the last releas