function isUndefined
Usage in Deno
import { isUndefined } from "node:util";
isUndefined(object: unknown): object is undefined
Deprecated
Since v4.0.0 - Use value === undefined
instead.
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