网页
综合
更新时间 2026-11-06 00:56:43
es-toolkit/compat | es-toolkit
自动蜘蛛
es-toolkit.dev
正文约 1398 字
Browser & Node.js Support
es-toolkit/compat mirrors Lodash's interface and behavior 1:1. It exists so you can lift an existing Lodash codebase into es-toolkit without rewriting call sites, and migrate to the strict API at your own pace.
If your project does not already use Lodash, please use es-toolkit instead.
✅ 100% compatibility since v1.39.3
es-toolkit/compat passes Lodash's own test suite, so behavior is identical while staying lighter and faster.
Recommended path for removing Lodash from an existing codebase:
Like lodash/merge, every compat function is also available as its own entry point. It loads only the files that function needs, instead of the entire es-toolkit/compat module.
This helps in environments where tree-shaking is not available, such as CommonJS require() calls, React Native, or code running directly on Node.js without a bundler.
For function-level documentation, see the Compat Reference.
Design principles are subject to change.
Our compatibility layer aims to achieve feature parity with 100% accuracy for:
However, the following are out of scope for es-toolkit/compat:
The following emojis indicate the status of each feature:
Even if a feature is marked "in review," it might already be under review to ensure it matches lodash perfectly, and it could already offer the same functionality.
Released under the MIT License.
Copyright © 2026 Viva Republica, Inc.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。