@eroyeroy/utils - v0.1.0
    Preparing search index...

    Function dropArray

    • Returns a new array with the first count elements removed.

      Type Parameters

      • T

      Parameters

      • array: readonly T[]

        The source array.

      • count: number

        Number of elements to drop (must be a non-negative integer).

      Returns T[]

      dropArray([1, 2, 3, 4], 2) // => [3, 4]
      dropArray([1, 2], 5) // => []