mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-29 04:34:01 +03:00
16 lines
401 B
TypeScript
16 lines
401 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { capitalize as capitalizeToolkit } from 'es-toolkit';
|
|
import { capitalize as capitalizeLodash } from 'lodash';
|
|
|
|
describe('capitalize', () => {
|
|
bench('es-toolkit/capitalize', () => {
|
|
const str = 'camelCase';
|
|
capitalizeToolkit(str);
|
|
});
|
|
|
|
bench('lodash/capitalize', () => {
|
|
const str = 'camelCase';
|
|
capitalizeLodash(str);
|
|
});
|
|
});
|