summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md
diff options
context:
space:
mode:
authorFallenRiteMonk <fallenritemonk@gmail.com>2018-04-05 11:52:34 -0400
committerMyles Borins <mylesborins@google.com>2018-04-05 16:01:07 -0400
commit25a816dcda7b1db0929501acfe13f2fe5119759b (patch)
treed3df4377a11dfb643b5976d2048d9bb4ee527903 /deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md
parentb29c36b80746733994257b7380245102bc3c4cd6 (diff)
downloadandroid-node-v8-25a816dcda7b1db0929501acfe13f2fe5119759b.tar.gz
android-node-v8-25a816dcda7b1db0929501acfe13f2fe5119759b.tar.bz2
android-node-v8-25a816dcda7b1db0929501acfe13f2fe5119759b.zip
deps: upgrade npm to 5.8.0
PR-URL: https://github.com/nodejs/node/pull/19560 Fixes: https://github.com/nodejs/node/issues/19271 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md')
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md
new file mode 100644
index 0000000000..4988f7b126
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md
@@ -0,0 +1,56 @@
+# pumpify
+
+Combine an array of streams into a single duplex stream using [pump](https://github.com/mafintosh/pump) and [duplexify](https://github.com/mafintosh/duplexify).
+If one of the streams closes/errors all streams in the pipeline will be destroyed.
+
+```
+npm install pumpify
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pumpify.svg?style=flat)](http://travis-ci.org/mafintosh/pumpify)
+
+## Usage
+
+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](https://github.com/mafintosh/pump) so if one of them closes
+all streams will be destroyed.
+
+``` js
+var pumpify = require('pumpify')
+var tar = require('tar-fs')
+var zlib = require('zlib')
+var fs = require('fs')
+
+var untar = pumpify(zlib.createGunzip(), tar.extract('output-folder'))
+// you can also pass an array instead
+// var untar = pumpify([zlib.createGunzip(), tar.extract('output-folder')])
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+If you are pumping object streams together use `pipeline = pumpify.obj(s1, s2, ...)`.
+Call `pipeline.destroy()` to destroy the pipeline (including the streams passed to pumpify).
+
+### Using `setPipeline(s1, s2, ...)`
+
+Similar to [duplexify](https://github.com/mafintosh/duplexify) you can also define the pipeline asynchronously using `setPipeline(s1, s2, ...)`
+
+``` js
+var untar = pumpify()
+
+setTimeout(function() {
+ // will start draining the input now
+ untar.setPipeline(zlib.createGunzip(), tar.extract('output-folder'))
+}, 1000)
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+## License
+
+MIT
+
+## Related
+
+`pumpify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.