Bakhtina Sofya b84cb877be 1st comm 2 weeks ago
..
index.js b84cb877be 1st comm 2 weeks ago
license b84cb877be 1st comm 2 weeks ago
package.json b84cb877be 1st comm 2 weeks ago
readme.md b84cb877be 1st comm 2 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