mrkeyoor.com_
Wed 07 Oct 14:39 UTC
Dev Toolsevaluationupdated 07 Oct 2026

lodash review

Lodash is a JavaScript utility library for working with collections, objects, strings, functions, and values. It gives older and cross-runtime codebases a stable set of helpers, with full, core, per-method, ESM, and functional-programming builds.

Verdict

Our Lodash run installed 496 packages in 36 seconds, then passed its 4-second build and 15-second test step with 0 known vulnerabilities. Keep it in established codebases where its helpers already carry meaning, and use per-method imports when bundle size matters. For a new TypeScript project, start with the platform APIs and add a utility library only after repeated code proves the need.

We ran it

Install✓ · 36s496 packages · 188 MB
Build✓ · 4s
Tests✓ · 15sran, no count parsed
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)
Repo65 files~51,010 lines of source · 2.1 MB · 8 CI workflows · tests dir

Answers from our run

Does lodash build from source?

Dependencies installed in 36 seconds (496 packages), and the build succeeded in 4 seconds. We cloned commit 2b5e6f7 into a clean Debian container with 3 CPUs and no project-specific setup.

Do lodash's tests pass?

The test command failed in our container, and its output did not report a pass or fail count.

Does lodash have known vulnerabilities in its dependencies?

npm audit found none in the dependency tree at the time of our run.

Who should not use lodash?

New TypeScript applications that can express the same work clearly with current language and platform APIs: adding Lodash creates another vocabulary and type surface.

What are the alternatives to lodash?

es-toolkit, Remeda, Ramda. Our Lodash run installed 496 packages in 36 seconds, then passed its 4-second build and 15-second test step with 0 known vulnerabilities.

Setup5/5Install, build, and tests all passed in under 1 minute combined
Docs5/5Full API docs plus clear build, module, FP, and import guidance
Community5/561,342 stars and active October 2026 issue and pull request work
Maturity5/5v4.18.1, passing lab checks, and a feature-complete direction

Who it’s for

JavaScript teams maintaining code that already uses Lodash heavily.
Libraries that need consistent collection and object helpers across varied runtimes.
Developers who rely on mature helpers such as debounce, cloneDeep, merge, or iteratee shorthands.
Projects that will import individual methods or choose a smaller build deliberately.

Who it’s NOT for

New TypeScript applications that can express the same work clearly with current language and platform APIs: adding Lodash creates another vocabulary and type surface.
Browser bundles that import the full package for one or two helpers: the README lists the full build at about 24 kB gzipped and documents per-method imports.
Code that needs native structured cloning semantics: open issue 6228 reports that cloneDeep keeps Map keys by reference while cloning their values.
Callers passing zero-length-capable regular expressions to truncate: open issue 6274 shows a case that loops indefinitely and pins one CPU core.
Teams assuming a passing main-branch suite proves every published build: the v4.18.1 notes say a modular-build mapping error passed CI before breaking template and fromPairs.

Setup reality

Our run installed commit 2b5e6f7 in 36 seconds, adding 496 packages and using 188 MB on disk. The build succeeded in 4 seconds, and the test command passed in 15 seconds. npm audit found 0 known vulnerabilities.

The repository uses npm and needs no credentials or external service for the measured path. Its package manifest has no runtime dependency list, while the 496-package lab install reflects the repository's development and compatibility tooling.

Our scan found 8 CI workflow files and a tests directory, but no Dockerfile. Consumers can use the UMD package, lodash-es, lodash/fp, category modules, individual methods, or custom builds, so module choice is part of setup.

v4.18.1 remains useful when a codebase already speaks Lodash

Lodash packages familiar operations on arrays, objects, strings, functions, and values behind a consistent API. Methods such as get, merge, groupBy, debounce, and cloneDeep solve small problems that otherwise produce repeated local helpers. The library also supports iteratee shorthands, chaining, and a functional build. In an established application, that shared vocabulary can make old code easier to read than a mixture of hand-written loops and subtly different utility functions.

The calculation changes in new code. JavaScript now has Object.entries, optional chaining, nullish coalescing, Array.prototype methods, structuredClone, and other built-ins that cover part of Lodash's old territory. A dependency may still earn its place for debounce, deep comparison, path operations, or a large collection pipeline. Adding the full API for one trivial helper is harder to defend, especially when a teammate must learn both the platform operation and Lodash's variation.

What happened when we ran it

Our sandbox installed commit 2b5e6f7 in 36 seconds. npm added 496 packages, and the resulting development environment occupied 188 MB on disk. The build completed in 4 seconds, then the repository's test command passed in 15 seconds. npm audit reported 0 known vulnerabilities across all four severity levels. Our test method used a fresh unprivileged Debian container with 3 CPUs, 8 GB of RAM, Node 22, and no secrets. These figures describe the checkout and developer toolchain we tested, rather than the size or speed of code a consumer ships.

The measured repository was small before installation: 65 files, roughly 51,010 source lines, and 2.1 MB checked out. Our scan found 8 CI workflow files and a tests directory, with no Dockerfile. The package manifest has no listed runtime dependencies, so the 496 packages belong to development, build, documentation, compatibility, and test work. That distinction matters when judging supply-chain exposure in an application versus the maintenance cost of contributing to Lodash itself.

The full browser build is about 24 kB gzipped

The Lodash README lists a core build at about 4 kB gzipped and the full build at about 24 kB gzipped. npm users can load the main package, lodash/core, lodash/fp, method categories, or a single method such as lodash/at. An ESM distribution also exists as lodash-es. Those choices make bundle criticism more specific: a careless import can cost more than a deliberate per-method or ESM setup.

Module choice also affects maintenance. The main package is UMD, while lodash-es serves ESM users and lodash/fp changes argument order plus currying behavior. Those are separate contracts, not interchangeable spellings. Pick one convention for a project and enforce it through imports. Mixing full-package calls, per-method packages, and FP helpers makes upgrades harder to reason about and can defeat the size reduction that motivated cherry-picking in the first place.

v4.18.1 fixed a publishing gap that CI missed

The v4.18.1 release notes describe a useful failure. Internal dependencies changed, but a mapping in the separate build tool did not. The published modular builds then threw a ReferenceError in template and fromPairs. Maintainers fixed the release on April 1, 2026, and plainly said the defect passed CI because the tested source was not the same artifact users installed. Published-package smoke tests belong in a downstream team's upgrade check.

Lodash's repository is active despite its feature-complete direction. GitHub showed 61,342 stars, 121 combined issues and pull requests, and a push on October 1, 2026. The latest release was 6 months old, while October pull requests covered dependency updates, documentation, cloning, string conversion, and merge work. That mix reads as maintenance of a mature contract, not abandonment. The OpenJS-supported governance reboot also names a Technical Steering Committee in the repository.

Two current edge cases can change program behavior

Issue 6274 demonstrates truncate looping forever when its separator regex can match an empty string. The report says one CPU core reaches 100%, and two open pull requests propose advancing the regex index after an empty match. Issue 6228 shows cloneDeep cloning Map values while retaining original key references, unlike structuredClone. Both cases are narrow, reproducible reasons to test semantics instead of trusting a method name.

A newer report, issue 6292, shows camelCase('APIs') producing apIs rather than apis. An open pull request proposes a fix, but the report also illustrates why mature string helpers still need fixtures drawn from your own identifiers. Acronyms, separators, Unicode, and casing conventions are product rules as much as library behavior. Pin the version and keep representative names in application tests when output becomes a URL, key, or generated symbol.

Lodash still earns its place when replacing it would churn a working codebase or when several distinctive helpers appear throughout the project. Our 15-second passing test run and clean audit support that conservative choice. A fresh application should begin smaller. Use native syntax for obvious operations, measure the shipped bundle, and add Lodash or a modern alternative when a repeated problem justifies another dependency and another set of semantics.

Alternatives

ProjectWhat it isPick it when
es-toolkitA TypeScript utility library with modern modules and Lodash-compatible helpers.pick this instead when TypeScript types and tree-shaken modern builds matter more than Lodash's long compatibility history.
RemedaA TypeScript-first utility library that supports data-first and data-last calls.pick this instead when typed functional pipelines are central to the codebase.
Ramda gh↗A functional JavaScript library built around currying and data-last composition.pick this instead when the team explicitly wants a functional programming style across the application.

What people are saying

  1. [github-trending] lodash/lodash

Sources

  1. Lodash README and module guidance
  2. Lodash v4.18.1 release notes
  3. truncate zero-length regex issue
  4. cloneDeep Map key behavior issue
  5. camelCase acronym behavior issue

More dev tools reviews

open-ontologies · MangoDisk · raddebugger · blur-my-shell · skills · niimbot · the whole board →