es-toolkit/benchmarks/performance/isNull.bench.ts
정해준 999a4daf87
Some checks are pending
CI / codecov (push) Waiting to run
Release / release (push) Waiting to run
feat(isNull): Add compatibility with lodash (#264)
* feat(isNull): Add isNull benchmark

* feat(isNull): Add compat's isNull test code

* docs(isNull): Update isNull status from 'review' to 'complete'

* Update src/compat/predicate/isNull.spec.ts

* Update src/compat/predicate/isNull.spec.ts

---------

Co-authored-by: Sojin Park <raon0211@toss.im>
Co-authored-by: Sojin Park <raon0211@gmail.com>
2024-07-21 11:06:54 +09:00

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);
});
});