- From: Adam Rice <notifications@github.com>
- Date: Tue, 31 Oct 2017 07:09:49 +0000 (UTC)
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 31 October 2017 07:10:18 UTC
ricea commented on this pull request.
> @@ -4572,6 +4572,55 @@ and similarly, closing or aborting the <code>writable</code> side will implicitl
</div>
+<h3 id="example-ts-promise-to-readable">Using an identity transform stream as a primitive when manipulating streams</h3>
+
+Combining an identity transform stream with {{pipeTo()}} is a powerful way to manipulate streams. For example,
+concatenating multiple readable streams into one:
+
+<pre><code class="lang-javascript">
+function concatenateReadables(readables) {
Using "async function" makes it return a promise. We could of course wrap it in a call to promiseToReadable(), but that would be poor for ergonomics.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/847#discussion_r147909204
Received on Tuesday, 31 October 2017 07:10:18 UTC