mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +03:00
19 lines
496 B
TypeScript
19 lines
496 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { chunk as chunkToolkit } from 'es-toolkit';
|
|
import { chunk as chunkCompatToolkit } from 'es-toolkit/compat';
|
|
import { chunk as chunkLodash } from 'lodash';
|
|
|
|
describe('chunk', () => {
|
|
bench('lodash/chunk', () => {
|
|
chunkLodash([1, 2, 3, 4, 5, 6], 3);
|
|
});
|
|
|
|
bench('es-toolkit/chunk', () => {
|
|
chunkToolkit([1, 2, 3, 4, 5, 6], 3);
|
|
});
|
|
|
|
bench('es-toolkit/compat/chunk', () => {
|
|
chunkCompatToolkit([1, 2, 3, 4, 5, 6], 3);
|
|
});
|
|
});
|