Maps an input iterable using a provided map function. Returns a new asynchronous iterable.
A function that accepts an input iterable and returns a new asynchronous iterable.
const input = [1, 2, 3];const double = (x: number) => x * 2;const mappedIterable = map(double)(input);(async () => { for await (const x of mappedIterable) { console.log(x); // Logs 2, 4, 6 }})();
The type of elements in the input iterable.
The type of elements in the output iterable.
A function that takes a value and its index and returns a new value.
Generated using TypeDoc
Maps an input iterable using a provided map function. Returns a new asynchronous iterable.
Returns
A function that accepts an input iterable and returns a new asynchronous iterable.
Example