UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

12 lines (10 loc) 230 B
export async function count(source, fn = async () => true) { let i = 0; for await (const item of source) { if (await fn(item)) { i++; } } return i; } //# sourceMappingURL=count.mjs.map