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

ordered-read-streams

Package Overview
Dependencies
Maintainers
2
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 1.0.0 to 1.0.1

36

index.js
var Readable = require('readable-stream/readable');
var isReadable = require('is-stream').readable;
var util = require('util');
function isReadable(stream) {
if (typeof stream.pipe !== 'function') {
return false;
}
if (!stream.readable) {
return false;
}
if (typeof stream._read !== 'function') {
return false;
}
if (!stream._readableState) {
return false;
}
return true;
}
function addStream (streams, stream) {

@@ -16,11 +35,10 @@ if (!isReadable(stream)) {

var chunk = stream.read();
if (chunk === null) {
return;
while (chunk) {
if (this === streams[0]) {
self.push(chunk);
} else {
this._buffer.push(chunk);
}
chunk = stream.read();
}
if (this === streams[0]) {
self.push(chunk);
} else {
this._buffer.push(chunk);
}
});

@@ -27,0 +45,0 @@

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

@@ -15,13 +15,13 @@ "files": [

"dependencies": {
"is-stream": "^1.0.1",
"readable-stream": "^2.0.1"
},
"devDependencies": {
"expect": "^1.20.2",
"jscs": "^1.13.1",
"jshint": "^2.8.0",
"mississippi": "^1.3.0",
"mocha": "^2.2.5",
"pre-commit": "^1.0.10",
"should": "^7.0.1",
"through2": "^2.0.0"
}
}
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