Noticeably Playful Monkeys

npm

Need private packages and team management tools?Check out npm Orgs. »

into-stream

5.1.1 • Public • Published

into-stream Build Status

Convert a string/promise/array/iterable/buffer/typedarray/arraybuffer/object 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 | TypedArray | ArrayBuffer | 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.object(input)

Type: object | Iterable<object> | Promise
Returns: Readable object stream

Related

install

npm i into-stream

Downloadsweekly downloads

1,813,195

version

5.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability