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

into-stream

Convert a string/promise/array/iterable/asynciterable/uint8array/typedarray/arraybuffer/readablestream/object into a stream

Correctly handles backpressure.

Install

npm install into-stream

Usage

import intoStream from 'into-stream';

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

API

intoStream(input)

Type: Uint8Array | TypedArray | ArrayBuffer | string | Iterable<string | Uint8Array | TypedArray> | AsyncIterable<string | Uint8Array | TypedArray> | ReadableStream | Promise
Returns: Readable stream

intoStream.object(input)

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

Limitations

The streams returned by this package cannot be used with the stdio option of Node.js child_process methods. Use fs.createReadStream() instead.

Related

Current Tags

  • 9.1.0                                ...           latest (10 months ago)

15 Versions

  • 9.1.0                                ...           10 months ago
  • 9.0.0                                ...           a year ago
  • 8.0.1                                ...           3 years ago
  • 8.0.0                                ...           4 years ago
  • 7.0.0                                ...           6 years ago
  • 6.0.0                                ...           6 years ago
  • 5.1.1                                ...           7 years ago
  • 5.1.0                                ...           8 years ago
  • 5.0.0                                ...           8 years ago
  • 4.0.0                                ...           8 years ago
  • 3.1.0                                ...           10 years ago
  • 3.0.0                                ...           10 years ago
  • 2.0.1                                ...           11 years ago
  • 2.0.0                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 42
Today 0
This Week 0
This Month 19
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (6)

© 2010 - cnpmjs.org x YWFE | Home | YWFE