That looks like it would work. Tried it, and I'm getting my chunk put into the middle of stream, instead of the end. I'm using the "node-trumpet" module to parse html.
I filed an issue for the module, so I'm not sure if it's the module or my code. On Wed, Jul 31, 2013 at 11:07 AM, Michael Ryan <[email protected]>wrote: > premature send... > > //assume var originalOutputStream > var originalEnd = originalOutputStream.end > originalOutputStream.end = function(data) { > originalOutputStream.write(data); > originalOutputStream.write(finalData); > originalEnd.call(originalOutputStream); > } > > ------------------------------ > From: [email protected] > To: [email protected] > Subject: RE: [nodejs] Appending one more chunk to the end of a stream. > Date: Wed, 31 Jul 2013 18:01:51 +0000 > > > Couldn't you override the end() method to push your last chunk, then call > the original end? > > ------------------------------ > Date: Wed, 31 Jul 2013 10:54:44 -0700 > From: [email protected] > To: [email protected] > Subject: [nodejs] Appending one more chunk to the end of a stream. > > Been sitting on this one for awhile and can't seem to figure it out or > find anyone that has a solution. > > I just need to append one more chunk to the end of a stream. At first, I > thought I was successful using the "through" module, but for some reason, > it kept appending the new chunk in the middle of the stream. > > Any direction would be helpful, thanks. > > -- > -- > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > -- > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > -- > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to a topic in the > Google Groups "nodejs" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/nodejs/P-ZA-iJts2E/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- - Scott -- -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
