A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller—a major upgrade to lodash.
Go to file
Filip Sobol c939d97322
perf(at): Improve performance and compatibility with lodash (#798)
* perf(at): Improve performance and compatibility with lodash

* Change the implementation to match `Array.prototype.at` implementation

* Avoid truncating numbers if they are already integers
2024-11-10 15:10:03 +09:00
.circleci chore(dev-deps): upgrade to eslint 9 (#396) 2024-08-20 21:55:39 +09:00
.github style(format): add prettier-plugin-sort-re-exports prettier plugin (#670) 2024-10-06 17:04:48 +09:00
.scripts feat(invariant): Implement invariant 2024-10-24 22:00:17 +09:00
.vscode style(format): add sorting imports plugin and fix eslint config (#625) 2024-10-01 14:00:45 +09:00
.yarn/sdks chore(dev-deps): upgrade to eslint 9 (#396) 2024-08-20 21:55:39 +09:00
benchmarks perf(at): Improve performance and compatibility with lodash (#798) 2024-11-10 15:10:03 +09:00
docs fix(isEmpty): isEmpty should return true for objects with only enumerable symbol properties (#791) 2024-11-09 23:19:17 +09:00
src perf(at): Improve performance and compatibility with lodash (#798) 2024-11-10 15:10:03 +09:00
tests test: Fix failing test 2024-10-24 22:13:18 +09:00
.attw.json test(ci): check the generated dist and package.tgz (#288) 2024-07-23 23:03:27 +09:00
.gitignore bench: pre-build es-toolkit when bench (#661) 2024-10-05 22:15:06 +09:00
.npmignore 1.0.0 2024-05-31 16:54:41 +09:00
.nvmrc 1.0.0 2024-05-31 16:54:41 +09:00
.prettierignore style(*): Setup prettier and apply formatting (#24) 2024-06-04 17:19:26 +09:00
.prettierrc.cjs style(format): add prettier-plugin-sort-re-exports prettier plugin (#670) 2024-10-06 17:04:48 +09:00
.yarnrc.yml docs: Add documentation automatic generation script 2024-09-08 17:02:19 +09:00
CHANGELOG.md v1.26.1 2024-10-25 14:25:33 +09:00
codecov.yml chore(coverage): exclude test files in coverage processes (#696) 2024-10-09 11:48:02 +09:00
eslint.config.mjs refactor: add a eslint rule restricting Object.entries and update prettier-plugin-sort-re-exports (#674) 2024-10-06 20:57:02 +09:00
jsr.json v1.26.1 2024-10-25 14:25:33 +09:00
LICENSE Update LICENSE 2024-07-15 08:33:26 +09:00
package.json v1.26.1 2024-10-25 14:25:33 +09:00
README-ja_jp.md docs: Update docs for wide adoption 2024-10-14 15:50:42 +09:00
README-ko_kr.md docs: Update docs for wide adoption 2024-10-14 15:50:42 +09:00
README-zh_hans.md docs: Update docs for wide adoption 2024-10-14 15:50:42 +09:00
README.md docs: Update docs for wide adoption 2024-10-14 15:50:42 +09:00
rollup.config.mjs style(format): add sorting imports plugin and fix eslint config (#625) 2024-10-01 14:00:45 +09:00
SECURITY.md docs: Add docs for isObject 2024-09-12 21:59:33 +09:00
tsconfig.json chore: Fix type errors 2024-09-08 17:54:22 +09:00
vitest.config.mts chore(coverage): exclude test files in coverage processes (#696) 2024-10-09 11:48:02 +09:00
yarn.lock refactor: add a eslint rule restricting Object.entries and update prettier-plugin-sort-re-exports (#674) 2024-10-06 20:57:02 +09:00

es-toolkit · MIT License codecov NPM badge JSR badge Discord Badge

English | 한국어 | 简体中文 | 日本語

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 utilized by several popular open-source libraries, such as Storybook and ink.
  • es-toolkit is battle-tested with 100% test coverage, ensuring reliability and robustness.

Examples

// import from '@es-toolkit/es-toolkit' in jsr.
import { chunk, debounce } from 'es-toolkit';

const debouncedLog = debounce(message => {
  console.log(message);
}, 300);

// This call will be debounced
debouncedLog('Hello, world!');

const array = [1, 2, 3, 4, 5, 6];
const chunkedArray = chunk(array, 2);

console.log(chunkedArray);
// Output: [[1, 2], [3, 4], [5, 6]]

Contributing

We welcome contribution from everyone in the community. Read below for detailed contribution guide.

CONTRIBUTING

License

MIT © Viva Republica, Inc. See LICENSE for details.

Toss