stream-collector

WebJar for stream-collector

Лицензия

Лицензия

MIT
Группа

Группа

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

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

stream-collector
Последняя версия

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

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

stream-collector
WebJar for stream-collector
Ссылка на сайт

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

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

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

https://github.com/mafintosh/stream-collector

Скачать stream-collector

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : once jar [1.3.1,2)

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

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

stream-collector

Buffer data from a stream into an array if a callback is provided

npm install stream-collector

build status

Usage

var collect = require('stream-collector')

collect(stream, function(err, list) {
  // list contains all data chunks from stream  
})

The stream is always returned from the function. If a callback isn't provided no buffering will occur. This allows you to do the following pattern where if you provide a callback the stream will be buffered (similar to how request works)

var read = function(cb) {
  var stream = db.createReadStream()
  return collect(stream, cb)
}

var stream = read() // does not buffer

read(function(err, list) {
  // buffers the data
})

License

MIT

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

Версия
1.0.1