ES-Toolkit is a modern, high-performance JavaScript utility library designed for both Node.js and browser environments, emphasizing a small bundle size and robust TypeScript type annotations. Currently at version 1.45.1, the library demonstrates an aggressive release cadence, with updates typically arriving monthly or bi-monthly, reflecting continuous development and refinement. Key differentiators include its focus on performance, minimal footprint, and comprehensive type definitions which make it an excellent choice for TypeScript projects. It offers a wide array of functions for array manipulation, object operations, asynchronous utilities, and more, often providing Lodash-like functionality with a modern, tree-shakable architecture. Recent updates have focused on refining type safety, enhancing compatibility with Lodash behaviors, and introducing async utility methods.
npm install es-toolkitVerified import paths — ran on the pinned version, not inferred.
Demonstrates core utility functions like deep cloning, object emptiness checks, throttling, asynchronous mapping, and retrying operations, highlighting its modern API and TypeScript compatibility.
Review calls to `sample` and ensure type assertions or nullish checks are appropriate for a return type that *does not* include `undefined` (as of v1.45.1 and earlier versions).
Test `merge` functionality thoroughly after upgrading to v1.43.0 or later, especially with complex nested objects, arrays, and special value types like `Date`.
Upgrade to v1.43.0 or later to get the correct `throttle` behavior. Review any existing `throttle` implementations to ensure they now function as intended after the fix.
Verify usages of `omit` on array-like objects after upgrading to v1.42.0. Ensure your code does not depend on `omit` modifying array-like objects in unexpected ways.
If using `defaultsDeep` with arrays containing objects, upgrade to v1.39.10 or later and re-test to ensure merging occurs as expected.
Ensure you are using `import { someFunction } from 'es-toolkit';` for ESM environments. Verify the specific function exists in your installed version. Prior to v1.45.0, some packages might have been missing from `publishConfig`, leading to module not found errors for specific utilities.Check the exact version of `es-toolkit` you are using. For `sample`, ensure you are on v1.45.1+ if you expect no `undefined` in the return type. Always add appropriate nullish checks or type guards when dealing with potentially optional return values.
Review the function signature in the ES-Toolkit documentation or your IDE's type hints. Ensure your input types align with the expected parameters. You might need to refine your own types, use type assertions (`as`), or provide explicit type arguments if the function is generic.
For Node.js, ensure your `package.json` has `"type": "module"` or use a `.mjs` file extension. For older environments, consider using a bundler (like Webpack, Rollup, Parcel) to transpile your code to a compatible format.
No dependency data recorded yet.