Socket
Socket
Sign inDemoInstall

into-stream

Package Overview
Dependencies
10
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    into-stream

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


Version published
Maintainers
1
Install size
199 kB
Created

Readme

Source

into-stream Build Status

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

Correctly chunks up the input and handles backpressure.

Install

$ npm install into-stream

Usage

const intoStream = require('into-stream');

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

API

intoStream(input)

Type: Buffer | TypedArray | ArrayBuffer | string | Iterable<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> | Promise
Returns: Readable object stream

Keywords

FAQs

Last updated on 04 Oct 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc