es-toolkit/benchmarks/lowerCase.bench.ts

16 lines
392 B
TypeScript
Raw Normal View History

import { bench, describe } from 'vitest';
import { lowerCase as lowerCaseToolkit } from 'es-toolkit';
import { lowerCase as lowerCaseLodash } from 'lodash';
describe('lowerCase', () => {
bench('es-toolkit/lowerCase', () => {
const str = 'camelCase';
lowerCaseToolkit(str);
});
bench('lodash/lowerCase', () => {
const str = 'camelCase';
lowerCaseLodash(str);
});
});