es-toolkit/benchmarks/performance/startCase.bench.ts
Dayong Lee bcc3e924fd
chore: move some of files to performance folder and change path of importing correctly (#375)
* Remove duplicated zipObjectDeep bench

* set: Move and import from compat

* cloneDeep: Move to benchmarks folder

* startCase: Move to benchmarks folder
2024-08-11 15:21:14 +09:00

22 lines
716 B
TypeScript

import { startCase as startCaseToolkit } from 'es-toolkit';
import { startCase as startCaseLodash } from 'lodash';
import { bench, describe } from 'vitest';
describe('startCase', () => {
bench('es-toolkit/startCase', () => {
startCaseToolkit('hello world');
startCaseToolkit('--foo--bar__baz 123');
startCaseToolkit('123numericValues');
startCaseToolkit('XMLHttpRequest');
startCaseToolkit('hello-World_of XML_httpRequest');
});
bench('lodash/startCase', () => {
startCaseLodash('hello world');
startCaseLodash('--foo--bar__baz 123');
startCaseLodash('123numericValues');
startCaseLodash('XMLHttpRequest');
startCaseLodash('hello-World_of XML_httpRequest');
});
});