npm install pumpify
Pass the streams you want to pipe together to pumpify
pipeline = pumpify(s1, s2, s3, ...).
pipeline is a duplex stream that writes to the first streams and reads from the last one.
Streams are piped together using pump so if one of them closes
all streams will be destroyed.
var pumpify =var tar =var zlib =var fs =var untar =// you can also pass an array instead// var untar = pumpify([zlib.createGunzip(), tar.extract('output-folder')])fs
If you are pumping object streams together use
pipeline = pumpify.obj(s1, s2, ...).
pipeline.destroy() to destroy the pipeline (including the streams passed to pumpify).
Similar to duplexify you can also define the pipeline asynchronously using
setPipeline(s1, s2, ...)
var untar =fs
pumpify is part of the mississippi stream utility collection which includes more useful stream modules similar to this one.