Function drop

  • Drop the specified amount of items from the given iterable or asynchronous iterable.

    Example

    const drop2 = drop(2);
    drop2([1, 2, 3, 4, 5]); // [3, 4, 5]

    Returns

    Curried function with amount in context.

    Parameters

    • amount: number | bigint

      Amount of items to drop.

    Returns (<Iterable>(iterable: Iterable) => GeneratorOutput<Iterable>)

      • <Iterable>(iterable: Iterable): GeneratorOutput<Iterable>
      • Type Parameters

        • Iterable extends AsynchronousIterable<unknown>

        Parameters

        • iterable: Iterable

        Returns GeneratorOutput<Iterable>