mirror of
https://github.com/toss/es-toolkit.git
synced 2024-12-01 10:45:08 +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);
|
|
});
|
|
});
|