array-concat-stream
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3175
40