[streams] TransformStream should allow transform algorithm to function as pull source (#384)

Consider, I want to implement a pipe that latches the last value written to it.  If many values are written before the next read then you just get the last value.

This currently cannot be implemented in TransformStream because the transformer function only has the option to enqueue or not enqueue any given chunk.  There is no way to overwrite a previously enqueued chunk.

It would be nice if the transformer function could act like a pull source so it maintained its own "queue".  In the latch case this would be a single value that gets overwritten.

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

Received on Thursday, 30 July 2015 20:08:10 UTC