mirror of
https://github.com/toss/es-toolkit.git
synced 2024-12-01 10:45:08 +03:00
16 lines
396 B
TypeScript
16 lines
396 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { padStart as padStartToolkit } from 'es-toolkit/compat';
|
|
import { padStart as padStartLodash } from 'lodash';
|
|
|
|
describe('padStart', () => {
|
|
bench('es-toolkit/padStart', () => {
|
|
const str = 'abc';
|
|
padStartToolkit(str, 6, '_-');
|
|
});
|
|
|
|
bench('lodash/padStart', () => {
|
|
const str = 'abc';
|
|
padStartLodash(str, 6, '_-');
|
|
});
|
|
});
|