UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

11 lines (9 loc) 269 B
import { identityAsync } from '../util/identity'; export async function sum(source, selector = identityAsync) { let value = 0; for await (const item of source) { value += await selector(item); } return value; } //# sourceMappingURL=sum.mjs.map