diff --git a/Roadmap.md b/Roadmap.md index d435dfd2dfeb3d..3b3603b995eda9 100644 --- a/Roadmap.md +++ b/Roadmap.md @@ -391,3 +391,14 @@ function multiWriter(writers: ...Writer): Writer { }; } ``` + +A utility function will be provided to make any `Reader` into an +`AsyncIterator`, which has very similar semanatics. + +```ts +function readerIterator(r: deno.Reader): AsyncIterator; +// Example +for await (let buf of readerIterator(socket)) { + console.log(`read ${buf.byteLength} from socket`); +} +```