Function isNullOrUndefined

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

    const util = require('util');

    util.isNullOrUndefined(0);
    // Returns: false
    util.isNullOrUndefined(undefined);
    // Returns: true
    util.isNullOrUndefined(null);
    // Returns: true

    Deprecated

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

    Parameters

    • object: unknown

    Returns object is null

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

    const util = require('util');

    util.isNullOrUndefined(0);
    // Returns: false
    util.isNullOrUndefined(undefined);
    // Returns: true
    util.isNullOrUndefined(null);
    // Returns: true

    Deprecated

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

    Parameters

    • object: unknown

    Returns object is null

Generated using TypeDoc