🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

into-stream

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

into-stream

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

latest
Source
npmnpm
Version
9.1.0
Version published
Weekly downloads
5M
-1.01%
Maintainers
1
Weekly downloads
 
Created
Source

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.

  • to-readable-stream - Simpler version of this package
  • get-stream - The opposite of this package

Keywords

stream

FAQs

Package last updated on 02 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts