Stream multiplexer, with callback ability
Suckle is a stream multiplexer for node. You pass it as many writable streams as you want, and it exposes a simple chainable API for treating it as if it were only one. Also, if enabled, you can wedge a callback for when the stream ends. This callback is supplied the accumulated data.
var Suckle =var mux = processstdoutmuxprocessstdinprocessstdin
The main problem Suckle solves is when you need a callback, to return the piped data. As a case study, say you have a static file server. Ideally, you would like to pipe node's file readStream to gzip, and then to the client. Fine. But what if you also need to cache that gzipped data in an object, for subsequent requests? With Suckle you can!
var fs =var zlib =var Suckle =var fileStream = fsvar zipper = zlibvar mux = true processstdoutmux