mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-29 04:34:01 +03:00
22 lines
562 B
TypeScript
22 lines
562 B
TypeScript
|
import { bench, describe } from 'vitest';
|
||
|
import { isBoolean as isBooleanToolkit } from 'es-toolkit';
|
||
|
import { isBoolean as isBooleanLodash } from 'lodash';
|
||
|
|
||
|
describe('isBoolean', () => {
|
||
|
bench('es-toolkit/isBoolean', () => {
|
||
|
isBooleanToolkit(true);
|
||
|
isBooleanToolkit(false);
|
||
|
isBooleanToolkit(undefined);
|
||
|
isBooleanToolkit('');
|
||
|
isBooleanToolkit(123);
|
||
|
});
|
||
|
|
||
|
bench('lodash/isBoolean', () => {
|
||
|
isBooleanLodash(true);
|
||
|
isBooleanLodash(false);
|
||
|
isBooleanLodash(undefined);
|
||
|
isBooleanLodash('');
|
||
|
isBooleanLodash(123);
|
||
|
});
|
||
|
});
|