mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 12:05:41 +03:00
16d326c4b2
* feat(capitalize): add capitalize * fix(capitalize): return type * Update docs/ko/reference/string/capitalize.md --------- Co-authored-by: Sojin Park <raon0211@gmail.com>
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);
|
|
});
|
|
});
|