A non-currying variant of withCustomAdapter. Takes an adapter function and returns an async iterable based on the adapter.
An AsyncIterable of U generated from the adapter function.
const arrayAdapter: Adapter<undefined, number> = () => { let index = 0; const array = [1, 2, 3]; return { next: () => Promise.resolve( index < array.length ? { value: array[index++], done: false } : { value: undefined, done: true } ), };};const iterable = customAdapter(arrayAdapter);(async () => { for await (const value of iterable) { console.log(value); // Logs 1, 2, 3 }})();
The type of data contained in the resulting async iterable.
The adapter function to transform the input value into an async iterable.
Generated using TypeDoc
A non-currying variant of withCustomAdapter. Takes an adapter function and returns an async iterable based on the adapter.
Returns
An AsyncIterable of U generated from the adapter function.
Example