mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-29 04:34:01 +03:00
26 lines
741 B
TypeScript
26 lines
741 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { isArguments as isArgumentsToolkit } from 'es-toolkit/compat';
|
|
import { isArguments as isArgumentsLodash } from 'lodash';
|
|
|
|
describe('isArguments', () => {
|
|
bench('es-toolkit/isArguments', () => {
|
|
isArgumentsToolkit([1, 2, 3]);
|
|
isArgumentsToolkit(true);
|
|
isArgumentsToolkit(new Date());
|
|
isArgumentsToolkit(new Error());
|
|
isArgumentsToolkit(1);
|
|
isArgumentsToolkit(/x/);
|
|
isArgumentsToolkit('a');
|
|
});
|
|
|
|
bench('lodash/isArguments', () => {
|
|
isArgumentsLodash([1, 2, 3]);
|
|
isArgumentsLodash(true);
|
|
isArgumentsLodash(new Date());
|
|
isArgumentsLodash(new Error());
|
|
isArgumentsLodash(1);
|
|
isArgumentsLodash(/x/);
|
|
isArgumentsLodash('a');
|
|
});
|
|
});
|