stream-with-known-length-to-buffer

WebJar for stream-with-known-length-to-buffer

Лицензия

Лицензия

MIT
Группа

Группа

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

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

stream-with-known-length-to-buffer
Последняя версия

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

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

stream-with-known-length-to-buffer
WebJar for stream-with-known-length-to-buffer
Ссылка на сайт

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

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

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

https://github.com/feross/stream-with-known-length-to-buffer

Скачать stream-with-known-length-to-buffer

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

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

Зависимости

compile (1)

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

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

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

stream-with-known-length-to-buffer travis npm downloads javascript style guide

Convert a Readable Stream with a known length into a Buffer

Sauce Test Status

This package converts a Readable Stream into a Buffer, with just one Buffer allocation (excluding allocations done internally by the streams implementation).

This is lighter-weight choice than stream-to-array when the total stream length is known in advance. This whole package is 15 lines.

This module is used by WebTorrent.

install

npm install stream-with-known-length-to-buffer

usage

var toBuffer = require('stream-with-known-length-to-buffer')

toBuffer(fs.createReadStream('file.txt'), 1000, function (err, buf) {
  if (err) return console.error(err.message)
  console.log(buf)
})

license

MIT. Copyright (c) Feross Aboukhadijeh.

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

Версия
1.0.2