es-toolkit/benchmarks/performance/isUndefined.bench.ts
정해준 d0812b81ab
feat(isUndefined): Add compatibility with lodash (#266)
* feat(isUndefined): Add isUndefined benchmark

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

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

* fix(isUndefined): fix typo

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

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

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

---------

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

19 lines
534 B
TypeScript

import { bench, describe } from 'vitest';
import { isUndefined as isUndefinedToolkit } from 'es-toolkit';
import { isUndefined as isUndefinedLodash } from 'lodash';
describe('isUndefined', () => {
bench('es-toolkit/isUndefined', () => {
isUndefinedToolkit(undefined);
isUndefinedToolkit(null);
isUndefinedToolkit('');
isUndefinedToolkit(123);
});
bench('lodash/isUndefined', () => {
isUndefinedLodash(undefined);
isUndefinedLodash(null);
isUndefinedLodash('');
isUndefinedLodash(123);
});
});