Function isNullOrUndefined

  • Checks if value is not null or undefined, acts as a typescript safeguard.

    Type Parameters

    • T

    Parameters

    • value: undefined | null | T

    Returns value is undefined | null

    Example

    [null, undefined, 1, 5].filter(isUndefined)
    > [null, undefined]

    [null, undefined, 1, 5].filter(isNot(isUndefined))
    > [1, 5]