docs/compatibility.md
::: tip ✅ Starting with version 1.39.3, we ensure 100% compatibility with Lodash
es-toolkit/compat functions exactly like all Lodash functions while being lighter and faster.
For detailed documentation of all available compat functions, check out our Compat Reference.
:::
// es-toolkit/compat aims to provide 100% feature parity with lodash
import { chunk } from 'es-toolkit/compat';
chunk([1, 2, 3, 4], 0);
// Returns [], which is identical to lodash
For maximum compatibility with lodash, use es-toolkit/compat, a compatibility layer that bridges the gap between the two libraries.
This module is designed to provide an identical API to lodash, making it easier to switch between the two libraries.
es-toolkit/compat has been thoroughly tested with real test cases from lodash.
It's important to note that es-toolkit/compat may have a slight performance impact and a larger bundle size compared to the original es-toolkit. This module is designed to facilitate a smooth transition and should be replaced with the original es-toolkit for optimal performance once the migration is complete.
::: info Design principles are subject to change. :::
Our compatibility layer aims to achieve feature parity with 100% accuracy for:
@types/lodash or @types/lodash-es.However, the following are out of scope for es-toolkit/compat:
Array.prototype, have been modified.::: info 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. :::
<CompatibilityStatus lang="en"/>