mirror of
https://github.com/toss/es-toolkit.git
synced 2024-12-01 10:45:08 +03:00
20 lines
460 B
TypeScript
20 lines
460 B
TypeScript
|
import { bench, describe } from 'vitest';
|
||
|
import { isNull as isNullToolkit } from 'es-toolkit';
|
||
|
import { isNull as isNullLodash } from 'lodash';
|
||
|
|
||
|
describe('isNull', () => {
|
||
|
bench('es-toolkit/isNull', () => {
|
||
|
isNullToolkit(null);
|
||
|
isNullToolkit(undefined);
|
||
|
isNullToolkit('');
|
||
|
isNullToolkit(123);
|
||
|
});
|
||
|
|
||
|
bench('lodash/isNull', () => {
|
||
|
isNullLodash(null);
|
||
|
isNullLodash(undefined);
|
||
|
isNullLodash('');
|
||
|
isNullLodash(123);
|
||
|
});
|
||
|
});
|