mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 12:05:41 +03:00
3cc1a03519
* chore: add codspeed * chore: fix the benchmark file to clearly distinguish between the comparison targets * chore: fix typo
20 lines
459 B
TypeScript
20 lines
459 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/isNil', () => {
|
|
isNilToolkit(null);
|
|
isNilToolkit(undefined);
|
|
isNilToolkit(123);
|
|
isNilToolkit([1, 2, 3]);
|
|
});
|
|
|
|
bench('lodash/isNil', () => {
|
|
isNilLodash(null);
|
|
isNilLodash(undefined);
|
|
isNilLodash(123);
|
|
isNilLodash([1, 2, 3]);
|
|
});
|
|
});
|