Bolshakova Anna ab21a11190 lab 2 weken geleden
..
index.js ab21a11190 lab 2 weken geleden
license ab21a11190 lab 2 weken geleden
package.json ab21a11190 lab 2 weken geleden
readme.md ab21a11190 lab 2 weken geleden

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