Re: [whatwg/streams] light weight transformations (#461)

@dominictarr, @gwicke: one real use case is a [streaming API for the `superagent` HTTP client](https://github.com/visionmedia/superagent/issues/1033). We'd like to make it play nicely with web streams, but the smallest I've been able to get the web streams polyfill down to [was 47K minified](https://github.com/ariutta/web-streams-polyfill). Since the browser version of `superagent` is currently just 13K, the web streams polyfill is too large to include.

@dominictarr, any suggestions for how [your idea above](https://github.com/whatwg/streams/issues/461#issuecomment-237062145) could be implemented for the `superagent` streaming API? I like the idea of making the API the lowest common denominator and very lightweight. The options I've been considering for how to make the stream available:
* as a `pull-through` stream
* as an event emitter with `data` and `end` events and `write` and `end` methods
* match the Node version of `superagent`, which exposes a [`pipe`](http://visionmedia.github.io/superagent/#piping-data) method
* maybe try to create a minimal polyfill for web streams with `pipeThrough` and `pipeTo` but no backpressure?

---
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/issues/461#issuecomment-237309446

Received on Wednesday, 3 August 2016 17:58:08 UTC