mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +03:00
a02b4158eb
* Add isObjectLike * Add isArguments * remove duplicate function noop * Remove un duplicated function * add bench * update compatibility * Add docs --------- Co-authored-by: Sojin Park <raon0211@toss.im>
26 lines
734 B
TypeScript
26 lines
734 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { isArguments as isArgumentsToolkit } from 'es-toolkit';
|
|
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');
|
|
});
|
|
});
|