• Returns all but the last item in an array, or the fallback list is null or undefined.

    Type Parameters

    • T

    Parameters

    • fallback: T[]

    Returns ((list) => T[])

      • (list): T[]
      • Parameters

        • list: T[]

        Returns T[]

    Example

    init([])([3, 6, 9])
    // => [3, 6]

    init([])(undefined)
    // => []

Generated using TypeDoc