{
 "kind": "tool",
 "slug": "lodash",
 "path": "tools/lodash/",
 "name": "Lodash",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Utilities",
   "tools/utilities/"
  ]
 ],
 "lead": "Ready-made helpers for lists and objects.",
 "chips": [
  {
   "label": "Utilities",
   "path": "tools/utilities/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install lodash"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/lodash/lodash"
  },
  {
   "label": "Website",
   "href": "https://lodash.com/"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software",
   "note": "Free for paid and closed products; keep the MIT notice with the package files.",
   "src": "https://github.com/lodash/lodash/blob/main/LICENSE"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Oct 1, 2026",
   "note": "Latest GitHub release Apr 1, 2026. ",
   "src": "https://github.com/lodash/lodash"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "111 projects",
   "status": "info",
   "sub": "#8 of 408 in its category",
   "note": "Dependency in 111 public GitHub projects set up for AI coding agents that we scanned (1.8%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 11, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Lodash does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Sales per city on a dashboard",
       "text": "Your admin page groups a list of orders by city, adds up each group and shows the biggest first.",
       "idea": false
      },
      {
       "title": "Search as you type",
       "text": "A search box asks the server only after the user pauses, not on every key, so you send one request instead of five.",
       "idea": false
      },
      {
       "title": "Read settings that may be missing",
       "text": "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.",
       "idea": false
      },
      {
       "title": "Merge defaults with user settings",
       "text": "Combine your default theme with what a user changed, keeping the parts they did not touch.",
       "idea": false
      },
      {
       "title": "Split long lists into pages",
       "text": "Show a long list of results 20 at a time, or send records to another service in batches.",
       "idea": false
      },
      {
       "title": "Spot changes before saving",
       "text": "Compare the form data with what was loaded and enable the Save button only when something really changed.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Lodash popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "84",
       "of": "/ 100",
       "l": "Gid Score, #46 overall"
      },
      {
       "n": "212M",
       "l": "downloads a week, npm"
      },
      {
       "n": "61.3K",
       "l": "GitHub stars"
      },
      {
       "n": "111",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Lodash is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "Lodash is a dependency in 111 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (2.3% of the 4,867 JavaScript/TypeScript ones), #8 of 408 in utilities.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 654; those are left out of every share on this page.",
      "Projects that use it most often also use Axios (40.5%), date-fns (38.7%), ESLint (69.4%).",
      "It is more common in projects set up for Roo Code (5.4%) than for GitHub Copilot (1.2%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "66 projects, 2.7%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "61 projects, 1.9%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "35 projects, 1.2%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "9 projects, 1.9%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "8 projects, 1.7%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "8 projects, 2.9%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "7 projects, 2.0%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "6 projects, 5.4%",
       "v": "Roo Code",
       "path": "agents/roo-code/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 40.5% of its projects",
       "v": "Axios",
       "path": "tools/axios/"
      },
      {
       "l": "In 38.7% of its projects",
       "v": "date-fns",
       "path": "tools/date-fns/"
      },
      {
       "l": "In 69.4% of its projects",
       "v": "ESLint",
       "path": "tools/eslint/"
      },
      {
       "l": "In 65.8% of its projects",
       "v": "Tailwind CSS",
       "path": "tools/tailwindcss/"
      },
      {
       "l": "In 61.3% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 77.5% of its projects",
       "v": "TypeScript",
       "path": "tools/typescript/"
      },
      {
       "l": "In 26.1% of its projects",
       "v": "uuid",
       "path": "tools/uuid/"
      },
      {
       "l": "In 46.8% of its projects",
       "v": "Prettier",
       "path": "tools/prettier/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "Lodash in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "A ~4 kB core next to the ~24 kB full build",
       "v": "The README offers two prebuilt files: a core build of ~4 kB gzipped and a full build of ~24 kB gzipped. It points to a build differences page so you can choose between them."
      },
      {
       "l": "One method per require",
       "v": "You can require a single method by path, for example <code>require('lodash/at')</code>. The README presents this as the way to get smaller browserify, rollup and webpack bundles."
      },
      {
       "l": "lodash/fp ships in the same package",
       "v": "<code>require('lodash/fp')</code> loads a build that the README describes as \"immutable auto-curried iteratee-first data-last methods\". FP methods can also be loaded one at a time, for example <code>lodash/fp/curryN</code>."
      },
      {
       "l": "ESM, AMD and per-method packages, plus build plugins",
       "v": "The module formats are the main package, per-method packages, <code>lodash-es</code>, <code>lodash/fp</code> and <code>lodash-amd</code>. The same list also names two build-tool packages: <code>babel-plugin-lodash</code> and <code>lodash-webpack-plugin</code>."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Moving to a Feature-Complete stage",
       "v": "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\"."
      },
      {
       "l": "Governance charter not yet published",
       "v": "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."
      },
      {
       "l": "A modular-build bug slipped past CI in the previous release",
       "v": "Release 4.18.1 fixes a <code>ReferenceError</code> in <code>lodash</code>, <code>lodash-es</code>, <code>lodash-amd</code> and <code>lodash.template</code> when using <code>template</code> and <code>fromPairs</code> 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\"."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Loading Lodash in Node.js"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Js",
       "code": "// Load the full build.\nvar _ = require('lodash');\n// Load the core build.\nvar _ = require('lodash/core');\n// Load the FP build for immutable auto-curried iteratee-first data-last methods.\nvar fp = require('lodash/fp');\n\n// Load method categories.\nvar array = require('lodash/array');\nvar object = require('lodash/fp/object');\n\n// Cherry-pick methods for smaller browserify/rollup/webpack bundles.\nvar at = require('lodash/at');\nvar curryN = require('lodash/fp/curryN');"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about Lodash",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Packages around it",
       "items": [
        "axios: HTTP client",
        "eslint: Linter",
        "prettier: Code formatter",
        "date-fns: Date utilities",
        "tailwindcss: Utility-first CSS",
        "uuid: UUID generation"
       ]
      },
      {
       "title": "More in Utilities",
       "path": "tools/utilities/",
       "items": [
        {
         "text": "clsx",
         "path": "tools/clsx/"
        },
        {
         "text": "date-fns",
         "path": "tools/date-fns/"
        },
        {
         "text": "PyYAML",
         "path": "tools/pyyaml/"
        },
        {
         "text": "uuid",
         "path": "tools/uuid/"
        },
        {
         "text": "yaml",
         "path": "tools/yaml/"
        },
        {
         "text": "js-yaml",
         "path": "tools/js-yaml/"
        },
        {
         "text": "glob",
         "path": "tools/glob/"
        },
        {
         "text": "tqdm",
         "path": "tools/tqdm/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Lodash",
       "me": true,
       "facts": [
        "MIT",
        "Gid 84",
        "212M/wk"
       ]
      },
      {
       "name": "es-toolkit",
       "why": "Pick es-toolkit for a newer, smaller helper library with TypeScript types built in that covers many of the same helpers.",
       "path": "tools/es-toolkit/",
       "facts": []
      },
      {
       "name": "lodash-es",
       "why": "Pick lodash-es for the same lodash helpers as ES modules, so front-end build tools keep only the helpers you use.",
       "path": "tools/lodash-es/",
       "facts": []
      },
      {
       "name": "Remeda",
       "why": "Pick remeda when you write TypeScript and want helpers designed for typed data from the start.",
       "path": "tools/remeda/",
       "facts": []
      }
     ],
     "more": "Compare Lodash with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Use lodash 4.18.1 for this data work (groupBy, orderBy, sumBy, debounce); import single helpers like lodash/debounce or use lodash-es in front-end code, do not use _.template, and prefer built-in JavaScript where it already does the job."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Add lodash to your project.",
       "code": "npm i --save lodash",
       "src": "https://lodash.com/"
      },
      {
       "text": "Load it in Node.js, or load single helpers to keep a web page small.",
       "code": "// Load the full build.\nvar _ = require('lodash');\n// Cherry-pick methods for smaller browserify/rollup/webpack bundles.\nvar at = require('lodash/at');\n",
       "src": "https://github.com/lodash/lodash/blob/main/README.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## Lodash\n- For smaller browserify, rollup or webpack bundles, require single methods by path (`require('lodash/at')`) instead of the whole library.\n- Before choosing between `lodash/core` (~4 kB gzipped) and the full build (~24 kB gzipped), review the build differences page.\n- Use `lodash/fp` when you want immutable, auto-curried, iteratee-first, data-last methods. Single FP methods load from `lodash/fp/<name>`, for example `lodash/fp/curryN`.\n- Use the `lodash-es` package for ES modules and `lodash-amd` for AMD.\n- 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.\n- The README says Lodash will move to a \"Feature-Complete maturity stage\".\n- To use Lodash in the REPL of Node.js versions below 6, install `n_`.\n"
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Rendering user text with _.template",
       "fix": "Use your framework's escaping templates (JSX, a server template engine) and keep untrusted input out of _.template",
       "why": "The docs mark _.template insecure and set it for removal in Lodash v5; 4.18.0 fixed another code injection in it."
      },
      {
       "dont": "npm install lodash.get (or other single lodash.* packages)",
       "fix": "Use optional chaining (obj?.a?.b ?? fallback), or require('lodash/get') from the main package",
       "why": "The lodash.get package is deprecated, and most lodash.* packages lag behind the main release."
      },
      {
       "dont": "import _ from 'lodash' in front-end code for one or two helpers",
       "fix": "import debounce from 'lodash/debounce' (or use lodash-es)",
       "why": "The main package is the whole library; cherry-picking keeps the page bundle small."
      },
      {
       "dont": "_.merge(defaults, userSettings) when defaults is shared",
       "fix": "_.merge({}, defaults, userSettings)",
       "why": "merge writes into its first argument, so shared defaults change for everyone."
      },
      {
       "dont": "Pinning lodash 4.17.21 because it was the latest for years",
       "fix": "Update to lodash 4.18.1",
       "why": "4.18.0 fixed prototype pollution in _.unset and _.omit and code injection in _.template."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Do I still need lodash in a new project?",
       "a": "Often only for a few helpers such as debounce, groupBy or merge. Loading single helpers keeps your bundle small.",
       "evidence": {
        "url": "https://github.com/lodash/lodash/blob/main/README.md",
        "quote": "Cherry-pick methods for smaller browserify/rollup/webpack bundles."
       }
      },
      {
       "q": "Is lodash still maintained?",
       "a": "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.",
       "evidence": {
        "url": "https://registry.npmjs.org/lodash",
        "quote": "\"4.18.1\":\"2026-04-01T21:01:20.458Z\""
       }
      },
      {
       "q": "Can I use _.template to fill in emails or pages?",
       "a": "No. The docs mark it insecure and say it will be removed in Lodash v5.",
       "evidence": {
        "url": "https://lodash.com/docs/4.18.1",
        "quote": "Avoid untrusted input."
       }
      },
      {
       "q": "Does _.merge change my original object?",
       "a": "Yes, it writes into the first object you pass. Pass an empty {} first to keep your defaults unchanged.",
       "evidence": {
        "url": "https://lodash.com/docs/4.18.1",
        "quote": "Subsequent sources overwrite property assignments of previous sources. Note: This method mutates object"
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm lodash"
  ],
  [
   "Category",
   "Utilities"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "4.18.1, April 1, 2026"
  ],
  [
   "On GitHub since",
   "April 2012"
  ],
  [
   "Gid Score",
   "84.2"
  ],
  [
   "Rank in category",
   "#8 of 408"
  ],
  [
   "GitHub",
   "lodash/lodash"
  ],
  [
   "Last change",
   "Oct 1, 2026"
  ]
 ],
 "good": [
  "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."
 ],
 "checked_line": "Read by AgentGid from 7 official pages, card checked Nov 11, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/lodash.png"
}