mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +03:00
16 lines
392 B
TypeScript
16 lines
392 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { snakeCase as snakeCaseToolkit } from 'es-toolkit';
|
|
import { snakeCase as snakeCaseLodash } from 'lodash';
|
|
|
|
describe('snakeCase', () => {
|
|
bench('es-toolkit/snakeCase', () => {
|
|
const str = 'camelCase';
|
|
snakeCaseToolkit(str);
|
|
});
|
|
|
|
bench('lodash/snakeCase', () => {
|
|
const str = 'camelCase';
|
|
snakeCaseLodash(str);
|
|
});
|
|
});
|