mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 03:34:26 +03:00
cf65b2c601
* chore: add prettierrc * chore: apply format with prettier config * chore: eslint error fix
16 lines
374 B
TypeScript
16 lines
374 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { shuffle as shuffleToolkit } from 'es-toolkit';
|
|
import { shuffle as shuffleLodash } from 'lodash';
|
|
|
|
describe('shuffle', () => {
|
|
bench('es-toolkit', () => {
|
|
const array = [1, 2, 3, 4, 5];
|
|
shuffleToolkit(array);
|
|
});
|
|
|
|
bench('lodash', () => {
|
|
const array = [1, 2, 3, 4, 5];
|
|
shuffleLodash(array);
|
|
});
|
|
});
|