mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 20:26:33 +03:00
d0812b81ab
* 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>
19 lines
534 B
TypeScript
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);
|
|
});
|
|
});
|