into-stream
Convert a string/promise/array/iterable/asynciterable/buffer/typedarray/arraybuffer/object into a stream
Last updated 2 months ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (2 months ago)

15 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |