Migrate Lodash to es-toolkit
https://es-toolkit.slash.page/
es-toolkit is a state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.
es-toolkit offers a variety of everyday utility functions with modern implementations, such as debounce, delay, chunk, sum, and pick. Designed with performance in mind, es-toolkit achieves 2-3× better performance in modern JavaScript environments. es-toolkit supports tree shaking out of the box, and reduces JavaScript code by up to 97% compared to other libraries. es-toolkit includes built-in TypeScript support, with straightforward yet robust types. It also provides useful type guards such as isNotNil. es-toolkit is battle-tested with 100% test coverage, ensuring reliability and robustness.
Purpose
This codemod migrates your Lodash imports to es-toolkit imports. By converting to es-toolkit, you can benefit from an optimized, modern utility library with better performance and smaller bundle sizes.
Usage
Apply this codemod to transform your Lodash imports to es-toolkit. The codemod will automatically replace the Lodash import paths with the appropriate es-toolkit paths.
Before
import { debounce, chunk } from 'lodash'; import { countBy } from 'lodash/array';
After
import { debounce, chunk } from 'es-toolkit'; import { countBy } from 'es-toolkit/array';