pumpify

WebJar for pumpify

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

pumpify
Последняя версия

Последняя версия

1.5.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

pumpify
WebJar for pumpify
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/mafintosh/pumpify

Скачать pumpify

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/pumpify/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>pumpify</artifactId>
    <version>1.5.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/pumpify/
implementation 'org.webjars.npm:pumpify:1.5.1'
// https://jarcasting.com/artifacts/org.webjars.npm/pumpify/
implementation ("org.webjars.npm:pumpify:1.5.1")
'org.webjars.npm:pumpify:jar:1.5.1'
<dependency org="org.webjars.npm" name="pumpify" rev="1.5.1">
  <artifact name="pumpify" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='pumpify', version='1.5.1')
)
libraryDependencies += "org.webjars.npm" % "pumpify" % "1.5.1"
[org.webjars.npm/pumpify "1.5.1"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.webjars.npm : duplexify jar [3.6.0,4)
org.webjars.npm : inherits jar [2.0.3,3)
org.webjars.npm : pump jar [2.0.0,3)

Модули Проекта

Данный проект не имеет модулей.

pumpify

Combine an array of streams into a single duplex stream using pump and duplexify. If one of the streams closes/errors all streams in the pipeline will be destroyed.

npm install pumpify

build status

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 so if one of them closes all streams will be destroyed.

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 you can also define the pipeline asynchronously using setPipeline(s1, s2, ...)

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 which includes more useful stream modules similar to this one.

Версии библиотеки

Версия
1.5.1
1.4.0
1.3.5