Function isStrictNullOrUndefined

  • Checks if the provided value is null, undefined only, a string value of "undefined" is NOT considered to be undefined.

    Parameters

    • value: any

      The value to check

    Returns boolean

    Example

    isStrictNullOrUndefined(null);         // true
    isStrictNullOrUndefined(undefined); // true
    isStrictNullOrUndefined("undefined"); // false

    let value = null;
    isStrictNullOrUndefined(value); // true
    let value = undefined;
    isStrictNullOrUndefined(value); // true

    isStrictNullOrUndefined(""); // false
    isStrictNullOrUndefined(0); // false
    isStrictNullOrUndefined(new Date()); // false
    isStrictNullOrUndefined(true); // false
    isStrictNullOrUndefined(false); // false