Variable: countAsync()
constcountAsync: <Value>(asyncIterable) =>Promise<number>
Defined in: statistics.d.ts:65
Returns a promise that resolves to the number of values in asyncIterable.
Like Array.prototype.length, but for async iterables.
Type Parameters
Value
Value
Parameters
asyncIterable
AsyncIterable<Value>
Returns
Promise<number>
Example
console.log(
await countAsync(asAsync([`sloth`, `more sloth`, `even more sloth`])),
)
//=> 3
Since
v0.0.1