into-stream
Convert a string/promise/array/iterable/asynciterable/buffer/typedarray/arraybuffer/object into a stream
Last updated 5 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm
$ cnpm install into-stream 
SYNC missed versions from official npm registry.

into-stream Build Status

Convert a string/promise/array/iterable/asynciterable/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> | AsyncIterable<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> | AsyncIterable<object> | Promise
Returns: Readable object stream

Related

Current Tags

  • 6.0.0                                ...           latest (5 years ago)

4 Versions

  • 6.0.0                                ...           5 years ago
  • 3.1.0                                ...           9 years ago
  • 2.0.1                                ...           9 years ago
  • 5.1.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org