countAsync
countAsync(
iterable,signal?):Promise<number>
Defined in: packages/core/src/iterable/async/count.ts:16
Counts the elements of an iterable, consuming it.
The async counterpart of count, without its O(1) fast paths: a stream has
no size to read.
Time complexity: O(n).
Parameters
Section titled “Parameters”iterable
Section titled “iterable”MaybeAsyncIterable<unknown>
The iterable to count, sync or async.
signal?
Section titled “signal?”AbortSignal
Aborts the count.
Returns
Section titled “Returns”Promise<number>
How many elements it yielded.