mirror of
https://github.com/toss/es-toolkit.git
synced 2024-12-01 02:33:54 +03:00
cf65b2c601
* chore: add prettierrc * chore: apply format with prettier config * chore: eslint error fix
16 lines
464 B
TypeScript
16 lines
464 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { xorBy as xorByToolkit } from 'es-toolkit';
|
|
import { xorBy as xorByLodash } from 'lodash';
|
|
|
|
describe('xorBy', () => {
|
|
bench('es-toolkit', () => {
|
|
const idMapper = obj => obj.id;
|
|
xorByToolkit([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);
|
|
});
|
|
|
|
bench('lodash', () => {
|
|
const idMapper = obj => obj.id;
|
|
xorByLodash([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);
|
|
});
|
|
});
|