es-toolkit/benchmarks/performance/zipObjectDeep.bench.ts
2024-07-18 20:43:58 +09:00

16 lines
493 B
TypeScript

import { bench, describe } from 'vitest';
import { zipObjectDeep as zipObjectDeepToolkit } from 'es-toolkit/compat';
import { zipObjectDeep as zipObjectDeepLodash } from 'lodash';
describe('zipObjectDeep', () => {
bench('es-toolkit/zipObjectDeep', () => {
const str = 'kebab-case';
zipObjectDeepToolkit(['a.b[0].c', 'a.b[1].d'], [1, 2])
});
bench('lodash/zipObjectDeep', () => {
const str = 'kebab-case';
zipObjectDeepLodash(['a.b[0].c', 'a.b[1].d'], [1, 2])
});
});