Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array-concat-stream

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-concat-stream

A stream that takes in values and builds up an array. Every time the array is updated, the entire thing is emitted.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

array-concat-stream

A stream that takes in values and builds up an array. Every time the array is updated, the entire thing is emitted.

The idea is that you can take a stream of incoming events and then trigger some sort of action that requires the list of all the events gotten thus far.

API

ArrayConcatStream([initialArray])

parameters
  • [initialArray] (Array): Initial array to build up from
returns

(DuplexStream): When data is piped into it, it concatenates it with an internal array, then outputs the entire array

Example

var stdout = require("stdout")();
var StreamArray = require("stream-array");
var IntervalStream = require("interval-stream");
var ArrayConcatStream = require("array-concat-stream");

var data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0];

StreamArray(data)
  .pipe(IntervalStream(200, {
    objectMode: true
  }))
  .pipe(ArrayConcatStream())
  .pipe(stdout);

Keywords

FAQs

Package last updated on 12 Dec 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