| [a762898] | 1 | 
|
|---|
| 2 |
|
|---|
| 3 | # es-toolkit · [](https://github.com/toss/slash/blob/main/LICENSE) [](https://codecov.io/gh/toss/es-toolkit) [](https://www.npmjs.com/package/es-toolkit) [](https://jsr.io/@es-toolkit/es-toolkit) [](https://discord.gg/vGXbVjP2nY)
|
|---|
| 4 |
|
|---|
| 5 | English | [한국어](https://github.com/toss/es-toolkit/blob/main/README-ko_kr.md) | [简体中文](https://github.com/toss/es-toolkit/blob/main/README-zh_hans.md) | [日本語](https://github.com/toss/es-toolkit/blob/main/README-ja_jp.md)
|
|---|
| 6 |
|
|---|
| 7 | es-toolkit is a state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.
|
|---|
| 8 |
|
|---|
| 9 | - es-toolkit offers a variety of everyday utility functions with modern implementations, such as [debounce](https://es-toolkit.dev/reference/function/debounce.html), [delay](https://es-toolkit.dev/reference/promise/delay.html), [chunk](https://es-toolkit.dev/reference/array/chunk.html), [sum](https://es-toolkit.dev/reference/math/sum.html), and [pick](https://es-toolkit.dev/reference/object/pick.html).
|
|---|
| 10 | - Designed with performance in mind, es-toolkit achieves [2-3× better performance](https://es-toolkit.dev/performance.html) in modern JavaScript environments.
|
|---|
| 11 | - es-toolkit supports tree shaking out of the box, and [reduces JavaScript code by up to 97%](https://es-toolkit.dev/bundle-size.html) compared to other libraries.
|
|---|
| 12 | - es-toolkit offers a complete compatibility layer to seamlessly replace lodash, available as [es-toolkit/compat](https://es-toolkit.dev/compatibility.html).
|
|---|
| 13 | - es-toolkit includes built-in TypeScript support, with straightforward yet robust types. It also provides useful type guards such as [isNotNil](https://es-toolkit.dev/reference/predicate/isNotNil.html).
|
|---|
| 14 | - es-toolkit is trusted and used by popular open-source projects like [Storybook](https://github.com/storybookjs/storybook/blob/9d862798d666678cc4822e857c00bbd744169ced/code/core/package.json#L358), Recharts, ink, and CKEditor.
|
|---|
| 15 | - es-toolkit is battle-tested with 100% test coverage, ensuring reliability and robustness.
|
|---|
| 16 |
|
|---|
| 17 | ## Examples
|
|---|
| 18 |
|
|---|
| 19 | ```tsx
|
|---|
| 20 | // import from '@es-toolkit/es-toolkit' in jsr.
|
|---|
| 21 | import { chunk, debounce } from 'es-toolkit';
|
|---|
| 22 |
|
|---|
| 23 | const debouncedLog = debounce(message => {
|
|---|
| 24 | console.log(message);
|
|---|
| 25 | }, 300);
|
|---|
| 26 |
|
|---|
| 27 | // This call will be debounced
|
|---|
| 28 | debouncedLog('Hello, world!');
|
|---|
| 29 |
|
|---|
| 30 | const array = [1, 2, 3, 4, 5, 6];
|
|---|
| 31 | const chunkedArray = chunk(array, 2);
|
|---|
| 32 |
|
|---|
| 33 | console.log(chunkedArray);
|
|---|
| 34 | // Output: [[1, 2], [3, 4], [5, 6]]
|
|---|
| 35 | ```
|
|---|
| 36 |
|
|---|
| 37 | ## Contributing
|
|---|
| 38 |
|
|---|
| 39 | We welcome contribution from everyone in the community. Read below for detailed contribution guide.
|
|---|
| 40 |
|
|---|
| 41 | [CONTRIBUTING](https://github.com/toss/es-toolkit/blob/main/.github/CONTRIBUTING.md)
|
|---|
| 42 |
|
|---|
| 43 | ## License
|
|---|
| 44 |
|
|---|
| 45 | MIT © Viva Republica, Inc. See [LICENSE](./LICENSE) for details.
|
|---|
| 46 |
|
|---|
| 47 | <a title="Toss" href="https://toss.im">
|
|---|
| 48 | <picture>
|
|---|
| 49 | <source media="(prefers-color-scheme: dark)" srcset="https://static.toss.im/logos/png/4x/logo-toss-reverse.png">
|
|---|
| 50 | <img alt="Toss" src="https://static.toss.im/logos/png/4x/logo-toss.png" width="100">
|
|---|
| 51 | </picture>
|
|---|
| 52 | </a>
|
|---|