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

into-stream

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

import intoStream from '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

  • 7.0.0                                ...           latest (4 years ago)

11 Versions

  • 7.0.0                                ...           4 years ago
  • 6.0.0                                ...           4 years ago
  • 5.1.1                                ...           5 years ago
  • 5.1.0                                ...           6 years ago
  • 5.0.0                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 3.1.0                                ...           8 years ago
  • 3.0.0                                ...           8 years ago
  • 2.0.1                                ...           9 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 31
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (4)

Copyright 2013 - present © cnpmjs.org | Home |