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
18 lines
428 B
TypeScript
18 lines
428 B
TypeScript
import { union as unionToolkit } from 'es-toolkit';
|
|
import { union as unionLodash } from 'lodash';
|
|
import { bench, describe } from 'vitest';
|
|
|
|
describe('union', () => {
|
|
bench('es-toolkit', () => {
|
|
const array1 = [1, 2, 3];
|
|
const array2 = [3, 4, 5];
|
|
unionToolkit(array1, array2);
|
|
});
|
|
|
|
bench('lodash', () => {
|
|
const array1 = [1, 2, 3];
|
|
const array2 = [3, 4, 5];
|
|
unionLodash(array1, array2);
|
|
});
|
|
});
|