function isUndefined
isUndefined(object: unknown): object is undefined
Deprecated
Returns true
if the given object
is undefined
. Otherwise, returns false
.
import util from 'node:util';
const foo = undefined;
util.isUndefined(5);
// Returns: false
util.isUndefined(foo);
// Returns: true
util.isUndefined(null);
// Returns: false
object is undefined