Installation & Usage ​
es-toolkit is available via npm for Node.js and Bun, and through JSR for Deno.
You can also use es-toolkit in browsers by importing them in CDNs.
Node.js ​
es-toolkit supports Node.js 18 or later. Install es-toolkit with the following command:
npm install es-toolkitpnpm add es-toolkityarn add es-toolkitTo use a function from es-toolkit, simply import it and use as shown below.
import { sum } from 'es-toolkit';
sum([1, 2, 3]);Deno ​
es-toolkit is also available via JSR for Deno. To install es-toolkit, use the following command:
deno add @es-toolkit/es-toolkitNote that the package name includes an additional scope, distinct from npm, as per JSR restrictions.
import { sum } from '@es-toolkit/es-toolkit';
sum([1, 2, 3]);Bun ​
es-toolkit is also available on Bun. You can install it via the following command:
bun add es-toolkitBrowsers ​
You can find es-toolkit on CDNs such as jsdelivr, unpkg. We define _ to include all functions, similar to Lodash.
<script src="https://cdn.jsdelivr.net/npm/es-toolkit@%5E1"></script>
<script>
  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);
</script><script src="https://unpkg.com/es-toolkit@%5E1"></script>
<script>
  var arr = _.chunk([1, 2, 3, 4, 5, 6], 3);
</script>es-toolkit is also available on esm.sh for modern browsers.
<script type="importmap">
  {
    "imports": {
      "es-toolkit": "https://esm.sh/es-toolkit@%5E1"
    }
  }
</script>
<script type="module">
  import { chunk } from 'es-toolkit';
  chunk([1, 2, 3, 4, 5, 6], 3);
</script>
