Skip to content

dropAsync

dropAsync<T>(iterable, count): AsyncIterableIterator<T>

Defined in: packages/core/src/iterable/async/drop.ts:17

Yields everything after the first count elements.

The async counterpart of drop. An input shorter than count yields nothing.

Time complexity: O(n) — the skipped elements are still pulled from the source, because an iterable offers no way to seek past them.

T

MaybeAsyncIterable<T>

The input iterable, sync or async.

number

How many elements to skip. Must be a non-negative integer.

AsyncIterableIterator<T>

An iterator over the remaining elements.

If count is not a non-negative integer.