# Lodash — card for AI agents

Modular utility library with methods for common programming tasks and data manipulation.

Category: Utilities · npm package `lodash` · latest version 4.18.1 (checked 2026-11-01)
Install: `npm install lodash`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## Lodash
- For smaller browserify, rollup or webpack bundles, require single methods by path (`require('lodash/at')`) instead of the whole library.
- Before choosing between `lodash/core` (~4 kB gzipped) and the full build (~24 kB gzipped), review the build differences page.
- Use `lodash/fp` when you want immutable, auto-curried, iteratee-first, data-last methods. Single FP methods load from `lodash/fp/`, for example `lodash/fp/curryN`.
- Use the `lodash-es` package for ES modules and `lodash-amd` for AMD.
- Release 4.18.1 fixes a `ReferenceError` in `lodash`, `lodash-es`, `lodash-amd` and `lodash.template` when using `template` and `fromPairs` from the modular builds.
- The README says Lodash will move to a "Feature-Complete maturity stage".
- To use Lodash in the REPL of Node.js versions below 6, install `n_`.

## What it is
- Lodash describes itself as "A modern JavaScript utility library delivering modularity, performance, & extras." The GitHub repository was created on 2012-04-07 and is MIT licensed, and the README is for v4.18.1. The README says its methods are for iterating arrays, objects and strings, for manipulating and testing values, and for creating composite functions.
- It ships in several cuts. The README and the site both list a core build at ~4 kB gzipped and a full build at ~24 kB gzipped. In Node.js you can load the full library, the core build, a functional-programming build (`lodash/fp`), whole method categories such as `lodash/array`, or single methods such as `lodash/at`. Separate packages cover ES modules (`lodash-es`) and AMD (`lodash-amd`).
- The project's status is changing. The README says Lodash has received support from the Sovereign Tech Agency and "will transition to the Feature-Complete maturity stage". It is also rebooting its governance. A draft charter is promised "shortly", and the upcoming Technical Steering Committee "is already at work".

## Caveats
- Moving to a Feature-Complete stage: The README says Lodash "will transition to the Feature-Complete maturity stage". It gives the reason as keeping the library "stable, secure, and sustainable long-term".
- Governance charter not yet published: The README says Lodash is rebooting its governance and that a draft charter "will be published shortly". The members of the upcoming Technical Steering Committee are listed in GOVERNANCE.md.
- A modular-build bug slipped past CI in the previous release: Release 4.18.1 fixes a `ReferenceError` in `lodash`, `lodash-es`, `lodash-amd` and `lodash.template` when using `template` and `fromPairs` from the modular builds. The maintainers explain that distributions are built from main using lodash-cli, and a mapping there must be updated when internal dependencies change. They write that they missed this in the last release, and that it "passes in CI, but fails bc the build is not the same thing you tested".
- Older browsers are best-effort: The site lists the tested set as Node.js 4+, Bun 1.0+ and the latest Chromium, Firefox, WebKit and Edge via Playwright. For Chrome 74+, Firefox 66+, IE 11, Edge 18 and Safari 11+, it gives a "best-effort commitment to support".
- Extra tool needed for old Node REPLs: The site notes that using Lodash in the REPL of Node.js versions below 6 requires installing `n_`.

## Numbers (AgentGid data)
- Gid Score: 84.2 (#46 of all tools, 2 of 408 in its category)
- Used in 111 public projects set up for AI coding agents (1.8%)
- Downloads last week: 211,573,812 (as of 2026-11-24), +29.1% over 4 weeks
- GitHub stars: 61,328 (as of 2026-11-24)
- Last push: 2026-10-01

## Often used with
Axios 40.5%, date-fns 38.7%, ESLint 69.4%, Tailwind CSS 65.8%, React 61.3%, TypeScript 77.5%

## Links
- AgentGid page: https://agentgid.com/tools/lodash/
- Homepage: https://lodash.com/
- Repository: https://github.com/lodash/lodash
- Source: https://github.com/lodash/lodash#readme
- Source: https://github.com/lodash/lodash
- Source: https://github.com/lodash/lodash/releases
- Source: https://lodash.com/


## Lodash: ready-made helpers for lists and objects

Lodash is a free JavaScript package of small helpers for everyday data work. It groups a list of orders by city, sorts by several fields, reads a deep value safely or waits until a user stops typing. It works in the browser and in Node.js. Many of its jobs are now built into JavaScript itself, so new projects often need only a few of its helpers.

### Where to use it
- Sales per city on a dashboard: Your admin page groups a list of orders by city, adds up each group and shows the biggest first.
- Search as you type: A search box asks the server only after the user pauses, not on every key, so you send one request instead of five.
- Read settings that may be missing: Your app reads a deep value from user data, such as an address city, and falls back to a default when a part is empty.
- Merge defaults with user settings: Combine your default theme with what a user changed, keeping the parts they did not touch.
- Split long lists into pages: Show a long list of results 20 at a time, or send records to another service in batches.
- Spot changes before saving: Compare the form data with what was loaded and enable the Save button only when something really changed. (idea, not from the official pages)

### How to start
- Add lodash to your project.

```
npm i --save lodash
```

- Load it in Node.js, or load single helpers to keep a web page small.

```
// Load the full build.
var _ = require('lodash');
// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
var at = require('lodash/at');
```


### License
Free to use, also in paid and closed products, under the MIT license. Keep the license notice when you copy or ship its files; no visible credit is needed.

### Good to know
- Lodash is now kept stable rather than grown: the project is moving to a feature-complete stage with long-term security support.
- Version 4.18.0 of March 2026 fixed two security holes; older 4.17.x copies should be updated to 4.18.1.
- Its template helper is marked unsafe and will be removed in the next major version.
- The whole library is about 24 kB when compressed; loading single helpers keeps web pages smaller.

Checked 2026-11-11 against: https://lodash.com/, https://lodash.com/docs/4.18.1, https://github.com/lodash/lodash/blob/main/README.md, https://github.com/lodash/lodash/blob/main/LICENSE, https://github.com/lodash/lodash/releases/tag/4.18.0, https://registry.npmjs.org/lodash, https://registry.npmjs.org/lodash.get/latest

### Mistakes to avoid
- Don't: Rendering user text with _.template → Do: Use your framework's escaping templates (JSX, a server template engine) and keep untrusted input out of _.template (The docs mark _.template insecure and set it for removal in Lodash v5; 4.18.0 fixed another code injection in it.)
- Don't: npm install lodash.get (or other single lodash.* packages) → Do: Use optional chaining (obj?.a?.b ?? fallback), or require('lodash/get') from the main package (The lodash.get package is deprecated, and most lodash.* packages lag behind the main release.)
- Don't: import _ from 'lodash' in front-end code for one or two helpers → Do: import debounce from 'lodash/debounce' (or use lodash-es) (The main package is the whole library; cherry-picking keeps the page bundle small.)
- Don't: _.merge(defaults, userSettings) when defaults is shared → Do: _.merge({}, defaults, userSettings) (merge writes into its first argument, so shared defaults change for everyone.)
- Don't: Pinning lodash 4.17.21 because it was the latest for years → Do: Update to lodash 4.18.1 (4.18.0 fixed prototype pollution in _.unset and _.omit and code injection in _.template.)

### Questions
- Do I still need lodash in a new project? Often only for a few helpers such as debounce, groupBy or merge. Loading single helpers keeps your bundle small.
- Is lodash still maintained? Yes, in a stable, security-first mode. Version 4.18.1 came out on 1 April 2026 and the project is moving to a feature-complete stage.
- Can I use _.template to fill in emails or pages? No. The docs mark it insecure and say it will be removed in Lodash v5.
- Does _.merge change my original object? Yes, it writes into the first object you pass. Pass an empty {} first to keep your defaults unchanged.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
