[streams] Add an example of piping to a writable stream for consuming a readable stream (#393)

As an alternative to the read loop, you can do e.g.

```js
readableStream.pipeTo(new WritableStream({
    write(chunk) {
      console.log(value);
    },
    close() {
      console.log("--- all done");
    }
    abort(e) {
      console.log("--- error in the readable stream", e);
    }
  });
```

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/393

Received on Wednesday, 2 September 2015 22:20:48 UTC