mirror of
https://github.com/toss/es-toolkit.git
synced 2024-12-04 20:42:18 +03:00
19 lines
444 B
TypeScript
19 lines
444 B
TypeScript
|
import { bench, describe } from 'vitest';
|
||
|
import { isNil as isNilToolkit } from 'es-toolkit';
|
||
|
import { isNil as isNilLodash } from 'lodash';
|
||
|
|
||
|
describe('isNil', () => {
|
||
|
bench('es-toolkit', () => {
|
||
|
isNilToolkit(null);
|
||
|
isNilToolkit(undefined);
|
||
|
isNilToolkit(123);
|
||
|
isNilToolkit([1, 2, 3]);
|
||
|
})
|
||
|
|
||
|
bench('lodash', () => {
|
||
|
isNilLodash(null);
|
||
|
isNilLodash(undefined);
|
||
|
isNilLodash(123);
|
||
|
isNilLodash([1, 2, 3]);
|
||
|
})
|
||
|
});
|