mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +03:00
18 lines
484 B
TypeScript
18 lines
484 B
TypeScript
|
import { bench, describe } from 'vitest';
|
||
|
import { startsWith as startsWithToolkit } from 'es-toolkit';
|
||
|
import { startsWith as startsWithLodash } from 'lodash';
|
||
|
|
||
|
describe('startsWith', () => {
|
||
|
bench('es-toolkit/startsWith', () => {
|
||
|
const str = 'fooBar';
|
||
|
startsWithToolkit(str, 'foo');
|
||
|
startsWithToolkit(str, 'Bar', 3);
|
||
|
});
|
||
|
|
||
|
bench('lodash/startsWith', () => {
|
||
|
const str = 'fooBar';
|
||
|
startsWithLodash(str, 'foo');
|
||
|
startsWithLodash(str, 'Bar', 3);
|
||
|
});
|
||
|
});
|