Bolshakova Anna ab21a11190 lab 3 weeks ago
..
index.js ab21a11190 lab 3 weeks ago
license ab21a11190 lab 3 weeks ago
package.json ab21a11190 lab 3 weeks ago
readme.md ab21a11190 lab 3 weeks ago

readme.md

into-stream Build Status

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

Correctly chunks up the input and handles backpressure.

Install

$ npm install --save into-stream

Usage

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

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

API

intoStream(input)

Type: buffer string array<buffer|string>
Returns: Readable stream

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

intoStream.obj(input)

Type: object, array<object>
Returns: Readable object stream

License

MIT © Sindre Sorhus