Looks good.
How often in practice are multiple on("end") and on("readable") events
going to be attached?
Would prefer to just have plain vanilla stream.onEnd = function() {} and
stream.onReadable = function() {} callbacks.
On Friday, July 27, 2012 6:57:01 AM UTC+2, Isaac Schlueter wrote:
>
> I think the real problem is with readable streams. Writable streams
> are pretty easy to implement, but the readable side is unnecessarily
> difficult and too easy to get wrong.
>
> Here's a proposal in code: https://github.com/isaacs/readable-stream
>
> The readme explains the position, and the implementation makes it easy
> to play around with. A base class and a fs readable stream class are
> provided. Note that Readable.pipe() is very short and simple :)
>
>
> On Sun, Jul 15, 2012 at 7:25 PM, Dominic Tarr <[email protected]>
> wrote:
> > I've been writing and using a lot of streams lately,
> > and have some proposals for some small changes to node's streams.
> >
> > https://gist.github.com/3117184
> >
> > in some parts it's a tightening up on expected behaviour,
> > in others it's a few small changes to Stream#pipe.
> >
> > cheers, Dominic
>