New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stream-array

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-array

Pipe an Array through Node.js streams

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

stream-array

Pipe an Array through Node.js streams. This is rather useful for testing other streams.

npm version build status dependencies devDependencies

Usage

var streamify = require('stream-array'),
    os = require('os');

streamify(['1', '2', '3', os.EOL]).pipe(process.stdout);

API

streamify(Array)

The result of require is a 'function' that when invoked, will return a Readable Stream.

var streamify = require('stream-array');

The Array passed into stream-array() can contain any type, as it assumes the receiving stream can handle it. Each element will be dequeued and pushed into the following piped stream.

var readable = streamify(['Hello', new Buffer('World')]);

This Stream will emit each element of the source array as chunks.

readable(['1', '2', '3', os.EOL]).pipe(process.stdout);
123\n

Install

npm install stream-array

License

MIT License

Keywords

FAQs

Package last updated on 09 Nov 2014

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc