Function isUndefined

  • Returns true if the given object is undefined. Otherwise, returns false.

    const util = require('util');

    const foo = undefined;
    util.isUndefined(5);
    // Returns: false
    util.isUndefined(foo);
    // Returns: true
    util.isUndefined(null);
    // Returns: false

    Deprecated

    Since v4.0.0 - Use value === undefined instead.

    Parameters

    • object: unknown

    Returns object is undefined

  • Returns true if the given object is undefined. Otherwise, returns false.

    const util = require('util');

    const foo = undefined;
    util.isUndefined(5);
    // Returns: false
    util.isUndefined(foo);
    // Returns: true
    util.isUndefined(null);
    // Returns: false

    Deprecated

    Since v4.0.0 - Use value === undefined instead.

    Parameters

    • object: unknown

    Returns object is undefined

Generated using TypeDoc