mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +03:00
20 lines
550 B
TypeScript
20 lines
550 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { zipWith as zipWithToolkit } from 'es-toolkit';
|
|
import { zipWith as zipWithLodash } from 'lodash';
|
|
|
|
describe('zipWith', () => {
|
|
bench('es-toolkit/zipWith', () => {
|
|
const arr1 = [1, 2];
|
|
const arr2 = [3, 4];
|
|
const arr3 = [5, 6];
|
|
zipWithToolkit(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`);
|
|
});
|
|
|
|
bench('lodash/zipWith', () => {
|
|
const arr1 = [1, 2];
|
|
const arr2 = [3, 4];
|
|
const arr3 = [5, 6];
|
|
zipWithLodash(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`);
|
|
});
|
|
});
|