• Checks value to determine whether a default value should be returned in its place. The defaultValue is returned if value is NaN, null, or undefined.

    Type Parameters

    • T

    Parameters

    • value: undefined | null | T

      The value to check.

    • defaultValue: T

      The default value.

    Returns T

    Returns the resolved value.

  • Type Parameters

    • T
    • TDefault

    Parameters

    • value: undefined | null | T
    • defaultValue: TDefault

    Returns T | TDefault

    _.defaultTo