es-toolkit: A Modern JavaScript Utility Library with Tree Shaking
A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller-a major upgrade to lodash.
At a glance
- What is it?
- es-toolkit is a TypeScript utility library that provides functions like debounce, chunk, sum, and pick with up to 97% smaller bundle sizes than lodash and 2-3x better performance in modern JavaScript environments. It includes a full lodash compatibility layer and 100% test coverage.
- Who is it for?
- es-toolkit is appropriate for any JavaScript or TypeScript project that currently depends on lodash and wants to reduce bundle size and improve runtime performance, particularly frontend applications where bundle size directly affects page load time. The es-toolkit/compat layer means migration can be gradual rather than a full rewrite.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 4 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 27, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The Case for Replacing Lodash with es-toolkit
Lodash remains one of the most widely used JavaScript utility libraries, but it was designed before native ES2015 methods made many of its functions redundant. Modern JavaScript environments provide Array.prototype.flatMap, Object.entries, and structuredClone natively. Lodash still ships all its polyfill-era code, which adds to bundle size even when only a handful of functions are needed.
es-toolkit is built on modern JavaScript from the start. The README states that it achieves 2-3x better performance in modern JavaScript environments and reduces bundle code by up to 97% compared to other libraries. The performance benchmark and bundle size comparison are documented at es-toolkit.dev/performance.html and es-toolkit.dev/bundle-size.html respectively.
The library is trusted and used by Storybook, Recharts, ink, and CKEditor according to the README, which links to the specific package.json lines in each of those repositories confirming the dependency.
How es-toolkit Achieves Small Bundle Sizes
The key mechanism is tree shaking. The package.json exports map exports individual subpaths for each functional domain: ./array, ./bigint, ./compat, ./error, ./fp, ./function, ./iterator, ./map, ./math, ./object, ./predicate, ./promise, ./set, ./string, ./server, ./types, and ./util. The sideEffects field is set to false in package.json, which tells bundlers that no module has side effects, enabling aggressive dead code elimination.
Importing a single function from es-toolkit adds only that function's compiled output to the bundle. A bundler that processes import { chunk } from 'es-toolkit' can exclude debounce, sum, pick, and every other function. With lodash, even named imports historically pulled in more code than necessary due to the library's internal structure.
The package is published on both npm and JSR (jsr.io/@es-toolkit/es-toolkit). The jsdelivr and unpkg fields in package.json point to dist/browser.global.js for CDN usage.
Installing and Using es-toolkit
Installation uses npm:
npm install es-toolkitThe README example shows the import and usage pattern:
import { chunk, debounce } from 'es-toolkit';
const debouncedLog = debounce(message => {
console.log(message);
}, 300);
// This call will be debounced
debouncedLog('Hello, world!');
const array = [1, 2, 3, 4, 5, 6];
const chunkedArray = chunk(array, 2);
console.log(chunkedArray);
// Output: [[1, 2], [3, 4], [5, 6]]The functions are available from the root package or from individual subpath imports. The current version is 1.52.0, released on 2026-08-28. The package is managed with Yarn 4.12.0 and built with tsdown.
For AI coding tools, es-toolkit provides Agent Skills via the Skills.sh platform:
npx skills add toss/es-toolkitFor Claude Code users, the plugin is also available through the plugin marketplace.
The Lodash Compatibility Layer
The es-toolkit/compat subpath provides a compatibility layer that matches lodash's API signatures, including edge cases and legacy behavior. The README links to the compatibility documentation at es-toolkit.dev/compatibility.html, which maps each lodash function to its es-toolkit/compat equivalent and notes any gaps.
The compat subpath is available as a named export path in package.json. Migrating an existing codebase can start by replacing import _ from 'lodash' with import _ from 'es-toolkit/compat', which should work for covered functions without changing call sites. Functions not yet implemented in the compat layer will need to remain on lodash or be replaced with native methods.
The compat layer intentionally replicates lodash behavior including quirks, which means it may behave differently from the main es-toolkit functions in edge cases. The documentation distinguishes between the two so developers know which to use in new code versus migration code.
TypeScript Support and Type Guards
es-toolkit is written in TypeScript and ships with type definitions included. The package.json exports each subpath as a TypeScript source file (e.g. ./array maps to ./src/array/index.ts), so consuming TypeScript projects get accurate types without a separate @types package.
The library includes type guard functions such as isNotNil for filtering nullable values in typed arrays. The predicate subpath groups these type-narrowing utilities. The types subpath exports utility types used across the library.
The fp subpath provides functional programming variants of the utility functions, and fp/iterator adds iterator-based variants. These are exported as separate subpaths rather than mixed into the main API surface, which keeps the tree-shaking story clean for consumers who do not need functional-style wrappers.
What es-toolkit Does Not Cover
es-toolkit is a utility function library, not a state management system, a data fetching layer, or a reactive programming library. It does not compete with tools like RxJS, Immer, or Zustand.
While the README claims 100% test coverage, the coverage metric applies to the test suite as written. Functions in es-toolkit/compat that have not been fully implemented are documented in the compatibility page; they are not silently missing. The CHANGELOG.md tracks additions across versions, and the current pace of about one release per month (v1.50.0 on 2026-07-24, v1.51.0 on 2026-08-17, v1.52.0 on 2026-08-28) shows active development.
For a project on Radash, the alternative JavaScript utility library oriented around modern async patterns, the trade-off is different. Radash focuses on async-first utilities and has a different function set. es-toolkit focuses on the same general utility space as lodash and competes there directly.
License, Maintenance, and Project Background
es-toolkit is published by Viva Republica, Inc., the company behind the Toss financial super app in South Korea. The license is MIT with a NOTICE file for additional attributions. The repository also contains a COPYING-MIT and an osv-scanner.toml for dependency vulnerability tracking.
The last push to the repository was on 2026-09-26. The project uses Codecov for test coverage reporting, with a codecov.yml configuration in the repository root. ESLint configuration is in eslint.config.mjs and Prettier in .prettierrc.cjs. The .vscode/ and .yarn/ directories indicate the project is developed using VS Code and Yarn.
The repository includes a SECURITY.md and an AGENTS.md alongside the CLAUDE.md, which documents the project's own Claude Code integration. These files reflect the project's investment in AI tooling integration as a first-class concern.
Editorial conclusion
es-toolkit is appropriate for any JavaScript or TypeScript project that currently depends on lodash and wants to reduce bundle size and improve runtime performance, particularly frontend applications where bundle size directly affects page load time. The es-toolkit/compat layer means migration can be gradual rather than a full rewrite. It is not appropriate for projects that rely on lodash functions not yet covered by the compat layer, so check the compatibility documentation at es-toolkit.dev/compatibility.html before migrating. The last push was on 2026-09-26 and the project releases monthly.
Frequently asked questions
What is es-toolkit?
es-toolkit is a TypeScript utility library providing functions like debounce, chunk, sum, and pick. It uses tree shaking to reduce bundle sizes by up to 97% compared to lodash, and achieves 2-3x better performance in modern JavaScript environments.
How does es-toolkit compare to Radash?
es-toolkit covers the same general utility space as lodash (array manipulation, object transformation, function utilities) and provides a lodash compatibility layer. Radash focuses more on modern async-first utilities. The two libraries overlap in some areas but have different design priorities.
What is the alternative to es-toolkit?
Lodash is the most direct alternative, offering the same functional domain with broader coverage of edge cases and a longer production history. The es-toolkit/compat subpath exists specifically to ease migration from lodash to es-toolkit.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/toss-es-toolkit)