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

promisepipe

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promisepipe - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.npmignore

8

index.js

@@ -8,2 +8,10 @@

return Q.promise(function(resolve, reject) {
// process.stdout and process.stderr are not closed or ended
// after piping like other streams. So we must resolve them
// manually.
if (stream === process.stdout || stream === process.stderr) {
return resolve();
}
stream.on("error", function(streamErr) {

@@ -10,0 +18,0 @@ var err = new Error(streamErr.message);

4

package.json
{
"name": "promisepipe",
"version": "1.0.0",
"version": "1.0.1",
"description": "Pipe node.js streams safely with Promises",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha test.js"
},

@@ -9,0 +9,0 @@ "repository": {

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

# promisePipe

@@ -15,3 +13,3 @@

It returns a promise. On success the resolved value will be an array of the
streams passed in. When rejected the an error object is created with following
streams passed in. When rejected an error object is created with following
keys:

@@ -72,3 +70,3 @@

Which is imo repeative and cumbersome.
Which is imo repeative and cumbersome (at least when you want to use promises).

@@ -56,2 +56,11 @@ /*global it, describe, beforeEach */

["stdout", "stderr"].forEach(function(stdio) {
it("can pipe to " + stdio, function(done) {
var input = fs.createReadStream(INPUT);
promisePipe(input, process[stdio]).done(function() {
done();
});
});
});
it("can handle errors from source", function(done) {

@@ -58,0 +67,0 @@ var input = fs.createReadStream("bad");

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