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