into-stream

2018-09-15 admin

into-stream是什么

什么是into-stream,Convert a buffer/string/array/object/iterable/promise into a stream

into-stream使用教程帮助文档

into-stream Build Status

Convert a buffer/string/array/object/iterable/promise into a stream

Correctly chunks up the input and handles backpressure.

Install

$ npm install into-stream

Usage

const intoStream = require('into-stream');

intoStream('unicorn').pipe(process.stdout);
//=> 'unicorn'

API

intoStream(input)

Type: Buffer string Iterable<Buffer|string> Promise Returns: Readable stream

Adheres to the requested chunk size, except for array where each element will be a chunk.

intoStream.obj(input)

Type: Object, Iterable<Object> Promise Returns: Readable object stream

Related

License

MIT © Sindre Sorhus

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-40342.html

文章标题:into-stream

回到顶部