mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +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, '_-');
|
|
});
|
|
});
|