there is need for base classed with more of the holes filled in than require('stream').Stream to make it easier to create streams.
it looks like this is what stream-stack is trying to achive, but to be honest, I can't quite see how it is best used. but maybe that is just because my approach is different. I've had a lot of luck with this function: https://github.com/dominictarr/event-stream#through-write-end it just creates a stream that by default, calls this.emit('data', data) on write, but you can pass in a custom write and end functions. it takes care of a lot of stuff that Stream doesn't do, like handle pause(), resume(), emits close after end() is called, and 'end' is emitted. it takes care of lots of little niggly stuff that needs to be done to work right, but can be tricky to debug. actually, that is the hardest thing about streams, testing them. I'm experimenting along those lines with this: https://github.com/dominictarr/event-stream#through-write-end it's a declarative assertion lib, for making assertions about the order of events/function invocations. the idea is to make it easy to have a reusable thing that checks a stream never emits 'data' after 'end' or always eventually emits 'close', stuff like that. On Wed, Jun 27, 2012 at 8:28 PM, Johnny Honestly <mostmodern...@gmail.com> wrote: > SWEET I got some question answered in this thread. > > Very helpful with the stream spec, thank you @dominic > > See also TooTallNate's https://github.com/TooTallNate/node-stream-stack > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en