es-toolkit

A modern JavaScript utility library that's 2-3x faster and up to 97% smaller than Lodash.

Library
npm
v1.52.0
11,332stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
88/100Excellent
Development Activity96
Maintenance100
Community68
Maturity48
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
91/100Excellent
Architecture84
Code Quality93
Innovation88
Learning Curve100

es-toolkit is a state-of-the-art JavaScript utility library built as a modern, high-performance alternative to Lodash. It ships hundreds of tree-shakable functions across arrays, objects, strings, promises, math, and more, each written in modern TypeScript with strict types and extensive JSDoc examples.

Beyond the core API, es-toolkit/compat provides a drop-in compatibility layer that mirrors Lodash’s exact behavior for teams migrating incrementally, while the core package stays lean, side-effect free, and optimized for bundlers. The project maintains extensive test coverage, cross-browser compatibility testing, and continuous benchmarking against Lodash to track its performance advantage.

What You Get

  • Hundreds of tree-shakable utility functions across array, object, string, function, promise, math, and predicate modules
  • A drop-in es-toolkit/compat layer that mirrors Lodash’s exact API and edge-case behavior
  • First-class TypeScript types and type-guard predicates (e.g. isNotNil) with no separate @types package needed
  • Verified performance improvements and a dramatically smaller bundle size versus Lodash, tracked by continuous benchmarks
  • Curried, data-last functional variants via the es-toolkit/fp entry point for composition-style pipelines

Common Use Cases

  • Replacing Lodash in a project to cut bundle size without rewriting call sites (via es-toolkit/compat)
  • Debouncing/throttling UI event handlers with debounce, throttle, and related function utilities
  • Array and object transformation pipelines (chunking, grouping, deep cloning, deep comparison) in data-processing code
  • Building typed utility layers in TypeScript applications that need strict null-safety and predicate helpers

Under The Hood

Architecture The project is organized as a flat, modular collection of single-purpose functions grouped by domain (src/array, src/object, src/string, src/function, src/predicate, src/math, src/promise, src/map, src/set, src/iterator, src/bigint, src/error, src/util, src/types), each exported from a domain index.ts and re-exported from the root src/index.ts; the library has zero runtime dependencies, so the core discipline is a strict one-function-per-file convention (each implementation file sits beside its own spec file) that keeps tree-shaking trivial. A parallel src/compat tree, with its own internal helpers for exact Lodash string-manipulation and object-merging parity, re-implements the same domains with Lodash’s precise, sometimes idiosyncratic edge-case semantics, wired together via an Object.assign onto a callable placeholder to reproduce Lodash’s mixin-style default export. A third tree, src/fp, builds curried/data-last variants on top of the core functions and adds its own lazy-evaluation engine implementing a generator-free “push” pipeline so chains of map/filter/take/flatMap fuse into a single loop instead of allocating per-stage iterators. This three-tier split (core / compat / fp) is the central architectural decision, and changing a core function’s signature ripples into both the compat shims and the fp wrappers.

Tech Stack es-toolkit is written entirely in TypeScript with zero runtime dependencies. It is built into dual ESM/CJS outputs plus a global browser bundle used by CDN distribution, and typed via hand-authored declaration files reachable through many fine-grained package.json subpath exports for the array, compat, fp, and platform-specific util entry points. The workspace is a Yarn Berry monorepo with docs, benchmarks, and dedicated type-testing and browser-compatibility-testing workspaces as siblings. Documentation is a dedicated static-site generator instance with per-function reference pages. Testing runs on a modern test runner with a coverage provider; type-level testing runs through a separate workspace layered on top of a package-export soundness checker, and a browser-compat harness exercises real browser engines via its own CI workflow.

Code Quality Every exported function has a co-located spec file exercised under the project’s test runner with coverage instrumentation enabled and configured for extensive coverage, and property-based testing is present as a development dependency. Error handling is explicit and typed — functions throw plain, descriptively-messaged errors for invalid input rather than silently coercing it, and a dedicated error module centralizes custom error types. Naming stays consistently camelCase, matching Lodash conventions where the compat layer requires exact parity. Type safety is strict, backed by a dedicated typecheck script and a large lint configuration that layers compatibility-target linting, ECMAScript-version restriction rules, and a custom rule discouraging certain array-iteration patterns for performance reasons. Continuous integration runs linting, type-checking, tests, static security analysis, and an open-source security posture check as separate gates.

API Design The public API mirrors familiar Lodash-style free functions, so migrating existing code requires minimal relearning, and every function ships a documentation block with parameter, return, and throw annotations plus runnable examples that also power the reference site — so developer-facing documentation lives directly next to the implementation rather than drifting out of sync. Getting started requires zero configuration, with no polyfills needed, and the compat entry point removes even the burden of renaming call sites when migrating from Lodash. The fp entry point offers curried, data-last equivalents for teams that prefer functional composition without needing a separate library.

Used by 19 apps in this directory

TypeScript
94%
MIT

Actual

Invoicing Finance

28,593

Local-first personal finance with envelope budgeting, end-to-end encryption, and multi-device sync — no subscription required.

View details
93
Repo Health
85
Technical
77
Dependency
Built with
TypeScript94%
Updated today
TypeScript
46%
AGPL 3.0

BrowserOS

Browser · AI Assistants

13,577

The open-source agentic Chromium browser with native AI agents, MCP server, and visual workflow automation — your data never leaves your machine.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript46%
Rust22%
Python18%
Updated yesterday
TypeScript
99%
AGPL 3.0

Cherry Studio

AI Assistants

51,521

All-in-one AI desktop client with 300+ assistants and multi-model support

View details
89
Repo Health
84
Technical
71
Dependency
Built with
TypeScript99%
Updated today
TypeScript
50%
Other

Dify

No Code Platforms · AI Development · Developer Tools

154,649

Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.

View details
92
Repo Health
85
Technical
67
Dependency
Built with
TypeScript50%
Python46%
Updated yesterday
TypeScript
89%
Other

FastGPT

AI Agents · AI Development

29,591

Build, debug, and deploy knowledge-based AI agents with a visual workflow editor, RAG retrieval, and support for any OpenAI-compatible LLM.

View details
93
Repo Health
84
Technical
69
Dependency
Built with
TypeScript89%
Updated yesterday
TypeScript
75%
Apache 2.0

Fern

Developer Tools

3,772

Fern turns a single OpenAPI, AsyncAPI, or Protobuf definition into type-safe SDKs for nine languages and a hosted API documentation site, all from one CLI and one source of truth.

View details
90
Repo Health
86
Technical
66
Dependency
Built with
TypeScript75%
Updated yesterday
TypeScript
38%
Apache 2.0

Label Studio

AI Development · Data Engineering

28,222

Label Studio is an open-source, multi-type data labeling platform that lets teams annotate images, text, audio, video, and time series data with a configurable XML-based UI and export annotations in formats ready for any ML framework.

View details
93
Repo Health
87
Technical
67
Dependency
Built with
TypeScript38%
JavaScript27%
Python25%
Updated today
TypeScript
99%
Other

LobeHub

AI Assistants · Productivity · Automation

82,273

Your Chief Agent Operator — build, schedule, and collaborate with an entire AI team in one self-hostable workspace.

View details
92
Repo Health
81
Technical
69
Dependency
Built with
TypeScript99%
Updated today
TypeScript
99%
AGPL 3.0

Manage

Project Management · Collaboration

70

Self-hosted, open-source project management with tasks, calendars, docs, and real-time team collaboration.

View details
41
Repo Health
57
Technical
71
Dependency
Built with
TypeScript99%
Updated 1 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search