substack/node-trumpet — pull request #6 by pgte (2012-09-15 16:24:50+00:00)
Title: composing

Made a series of changes to allow updating or replacing with a stream. More specifically, `stream.raw` is asynchronous and we now expect the callback functions to return a string or a stream.

I had to wrap the incoming stream with a bufferedstream in order for it to be properly pausable.

I also had to make sax-js pausable, pull request here: https://github.com/isaacs/sax-js/pull/65

While the sax-js PR is not accepted, instead of `sax` I now depend on my modified version, `sax-pausable´: https://github.com/pgte/sax-pausable

---

I did this change because I'm working on this streaming templating engine and composability is a requirement: https://github.com/pgte/woosh

If you don't take this PR I totally understand, just wanted to let you know. =)