UNPKG

axax

Version:

A library of async iterator extensions for JavaScript including ```map```, ```reduce```, ```filter```, ```flatMap```, ```pipe``` and [more](https://github.com/jamiemccrindle/axax/blob/master/docs/API.md#functions).

6 lines (5 loc) 302 B
/** * Goes through a iterable applying the scanner function to the accumulator * returning the accumulator at each step */ export declare function scan<T, A>(scanner: (accumulator: A, next: T) => Promise<A> | A, init: Promise<A> | A): (source: AsyncIterable<T>) => AsyncGenerator<A, void, unknown>;