mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-29 04:34:01 +03:00
fb51b98732
* feat(isArray): Add `isArray` * refactor(isArray): Simplify the return type of `isArray`
18 lines
440 B
TypeScript
18 lines
440 B
TypeScript
import { bench, describe } from 'vitest';
|
|
import { isArray as isArrayToolkit } from 'es-toolkit';
|
|
import { isArray as isArrayLodash } from 'lodash';
|
|
|
|
describe('isArray', () => {
|
|
bench('es-toolkit/isArray', () => {
|
|
isArrayToolkit([1, 2, 3]);
|
|
isArrayToolkit('abc');
|
|
isArrayToolkit(() => {});
|
|
});
|
|
|
|
bench('lodash/isArray', () => {
|
|
isArrayLodash([1, 2, 3]);
|
|
isArrayLodash('abc');
|
|
isArrayLodash(() => {});
|
|
});
|
|
});
|