New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stream-to-promise

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-to-promise - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

19

index.js

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

'use strict';
var toArray = require('stream-to-array');

@@ -6,3 +8,4 @@ var Promise = require('bluebird');

internals.readable = function (stream) {
var promise = Promise.promisify(toArray)(stream);
var promise = toArray(stream);
// Ensure stream is in flowing mode
stream.resume();

@@ -21,3 +24,3 @@ return promise

});
}
};

@@ -28,12 +31,10 @@ module.exports = function (stream) {

promise = internals.readable(stream);
} else if (stream.writable) {
}
else if (stream.writable) {
promise = internals.writable(stream);
} else {
}
else {
promise = Promise.resolve();
}
return promise
.catch(function (err) {
err = err.cause || err;
throw err;
});
return promise;
};
{
"name": "stream-to-promise",
"version": "1.0.0",
"version": "1.0.1",
"description": "Convert readable streams to promises",
"main": "index.js",
"scripts": {
"test": "mocha test.js"
"test": "mocha test"
},

@@ -24,11 +24,12 @@ "repository": {

"dependencies": {
"bluebird": "^2.3.0",
"stream-to-array": "~1.0.0"
"stream-to-array": "2",
"bluebird": "2"
},
"devDependencies": {
"chai-as-promised": "~4.1.1",
"chai": "~1.9.0",
"mocha": "~1.18.2",
"delayed-stream": "0.0.5"
"chai": "1",
"chai-as-promised": "4",
"delayed-stream": "0.0.5",
"mocha": "1",
"rimraf": "2"
}
}
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