Socket
Socket
Sign inDemoInstall

array-concat-stream

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

0

example/example.js

@@ -0,0 +0,0 @@ var stdout = require("stdout")();

10

index.js

@@ -8,8 +8,12 @@ var Transform = require("stream").Transform;

* Every time the array is updated, it is output
* @param {Array} state Optional initial array to build up from
* @param {Array} initialArray Optional initial array to build up from
*/
function ArrayConcatStream(state) {
function ArrayConcatStream(initialArray) {
// Ensure you have an initial array for the state
state = state || [];
var state = initialArray || [];
// Guard against having a non-Array passed in as initial state
if (!Array.isArray(state))
throw new Error('First argument must be an Array');
// Construct the stream

@@ -16,0 +20,0 @@ var stream = new Transform({

{
"name": "array-concat-stream",
"version": "1.0.0",
"version": "1.0.1",
"description": "A stream that takes in values and builds up an array. Every time the array is updated, the entire thing is emitted.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,6 +11,6 @@ # array-concat-stream

### `ArrayConcatStream([state])`
### `ArrayConcatStream([initialArray])`
#### parameters
* `[state]` (Array): Initial array to build up from
* `[initialArray]` (Array): Initial array to build up from

@@ -17,0 +17,0 @@ #### returns

Sorry, the diff of this file is not supported yet

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