mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +03:00
16 lines
476 B
TypeScript
16 lines
476 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/xorBy', () => {
|
|
const idMapper = obj => obj.id;
|
|
xorByToolkit([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);
|
|
});
|
|
|
|
bench('lodash/xorBy', () => {
|
|
const idMapper = obj => obj.id;
|
|
xorByLodash([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);
|
|
});
|
|
});
|