Skip to content

Bundle Size ​

Because es-toolkit/fp uses a modern implementation, it has a very small bundle size compared with other libraries. Compared with remeda, its bundle size is 1.5x to more than 10x smaller.

In this respect, es-toolkit/fp is the most efficient choice for reducing bundle size. Some utility functions are smaller than 100 bytes. Tree shaking is supported as well.

Bundle Size Comparison ​

es-toolkit/fpremeda
add72 bytes301 bytes
chunk286 bytes607 bytes
filter320 bytes391 bytes
flatMap556 bytes434 bytes
map314 bytes359 bytes
multiply72 bytes301 bytes
omit164 bytes471 bytes
pick180 bytes353 bytes
pipe759 bytes908 bytes
sortBy497 bytes612 bytes
take413 bytes443 bytes
uniq108 bytes1,233 bytes

Measurement Method ​

The numbers are measured with esbuild 0.28.0 by bundling concrete JavaScript imports like these:

typescript
import { filter } from 'es-toolkit/fp';

console.log(filter);
typescript
import { filter } from 'remeda';

console.log(filter);

See the benchmark files in benchmarks/bundle-size/fp/ for the exact scripts.

Released under the MIT License.