mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 12:05:41 +03:00
14 lines
412 B
TypeScript
14 lines
412 B
TypeScript
|
import { bench, describe } from 'vitest';
|
||
|
import { mapValues as mapValuesToolkit } from 'es-toolkit';
|
||
|
import { mapValues as mapValuesLodash } from 'lodash';
|
||
|
|
||
|
describe('mapValues', () => {
|
||
|
bench('es-toolkit/mapValues', () => {
|
||
|
mapValuesToolkit({ a: 1, b: 2, c: 3 }, value => `${value}a`);
|
||
|
});
|
||
|
|
||
|
bench('lodash/mapValues', () => {
|
||
|
mapValuesLodash({ a: 1, b: 2, c: 3 }, value => `${value}a`);
|
||
|
});
|
||
|
});
|