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).

5 lines (4 loc) 242 B
/** * Throttles an async iterator. Emits a value and then prevents emits until timer has completed. */ export declare function throttle<T>(timer: (value: T) => Promise<void>): (source: AsyncIterable<T>) => AsyncGenerator<T, void, unknown>;