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

ordered-read-streams

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ordered-read-streams - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

33

index.js

@@ -1,2 +0,3 @@

var Readable = require('stream').Readable;
var Readable = require('readable-stream').Readable;
var isReadable = require('isstream').isReadable;
var util = require('util');

@@ -7,7 +8,4 @@

{
if(!stream.readable) throw new Error('All input streams must be readable');
if(!isReadable(stream)) throw new Error('All input streams must be readable');
if(this._readableState.ended) throw new Error('Adding streams after ended');
var self = this;

@@ -17,4 +15,8 @@

stream.on('data', function(chunk)
stream.on('readable', function()
{
var chunk = stream.read();
if (chunk === null)
return;
if(this === streams[0])

@@ -44,3 +46,2 @@ self.push(chunk);

streams.push(stream);

@@ -70,16 +71,10 @@ }

this.concat = function()
streams.forEach(function(item)
{
Array.prototype.forEach.call(arguments, function(item)
{
if(Array.isArray(item))
item.forEach(addStream_bind);
if(Array.isArray(item))
item.forEach(addStream_bind);
else
addStream_bind(item);
});
};
this.concat(streams);
else
addStream_bind(item);
});
}

@@ -86,0 +81,0 @@ util.inherits(OrderedStreams, Readable);

{
"name": "ordered-read-streams",
"version": "0.1.0",
"version": "0.2.0",
"description": "Combines array of streams into one read stream in strict order",

@@ -21,3 +21,7 @@ "main": "index.js",

"pre-commit": "0.0.4"
},
"dependencies": {
"isstream": "^0.1.1",
"readable-stream": "^1.0.33"
}
}
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