Function nullishToEmptyArray

Converts a nullish array to an empty array

  • Type Parameters

    • T

      The type of array elements

    Parameters

    • Optionalvalue: null | T[]

      The array value to check (optional or null)

    Returns T[]

    The original array if it exists, otherwise an empty array