• Recursively flatten array up to depth times.

    Type Parameters

    • T

    Parameters

    • array: undefined | null | ListOfRecursiveArraysOrValues<T>

      The array to recursively flatten.

    • Optionaldepth: number

    Returns T[]

    Returns the new flattened array.