1. into-stream
Convert a string/promise/array/iterable/asynciterable/buffer/typedarray/arraybuffer/object into a stream
into-stream
Package: into-stream
Created by: sindresorhus
Last modified: Sat, 25 Nov 2023 14:02:45 GMT
Version: 8.0.1
License: MIT
Downloads: 13,273,424
Repository: https://github.com/sindresorhus/into-stream

Install

npm install into-stream
yarn add into-stream

into-stream

Convert a string/promise/array/iterable/asynciterable/buffer/typedarray/arraybuffer/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: Buffer | TypedArray | ArrayBuffer | string | Iterable<Buffer | string> | AsyncIterable<Buffer | string> | Promise
Returns: Readable stream

intoStream.object(input)

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code