Instead of Lodash: es-toolkit
Use es-toolkit. Its es-toolkit/compat entry point passes Lodash's own test suite, so you can change the import path and keep your call sites, and es-toolkit's own figures show it 2-3 times faster with up to 97% less code in your bundle.
Both are for everyday utility functions for arrays, objects, strings and functions in JavaScript.
Why es-toolkit is better
- Bundles shrink. es-toolkit's measurement puts pick at 132 bytes against 9554 bytes from lodash-es, and debounce at 531 bytes against 2901.
- Most functions run faster. es-toolkit's benchmark on Node.js shows omit 3.0x and pick 4.1x faster than Lodash, though a few, such as union, are no faster.
- TypeScript types are built in, where Lodash needs the separate @types/lodash package.
- It has 100% test coverage and is used by Storybook, Recharts, ink, MUI and CKEditor.
- Every compat function also has its own entry point, such as es-toolkit/compat/merge, so code without a bundler can load just what it needs.
When to keep Lodash
Keep Lodash in older code where bundle size and speed do not matter and nobody is touching the call sites. Also check whether you need either library, since modern JavaScript covers many old Lodash uses with built-ins such as structuredClone, Object.groupBy and Array.prototype.flat.
Switching
Change imports from lodash or lodash-es to es-toolkit/compat and run your tests; call sites stay the same. Then move call sites to the stricter es-toolkit entry point over time, and drop deprecated helpers that compat keeps only for parity.
Watch out
Only the compat layer is a drop-in. The main es-toolkit API leaves out implicit type coercion, alternative argument shapes and deprecated helpers, so moving from compat to it changes behavior in edge cases. Compat is slightly larger and slower than the main API. The library is maintained under the toss GitHub organization and is younger than Lodash.
More newer, better libraries, runtimes and developer tools
Sources
- es-toolkit home page
- es-toolkit: About
- es-toolkit: Compatibility with Lodash
- es-toolkit: Performance
- es-toolkit: Bundle footprint
- Lodash home page
- Lodash, Wikipedia
Judged on 2026-11-06. See every libraries, runtimes and developer tools, or all 66 replacements.