Comparing version 1.1.24 to 1.1.25
@@ -68,5 +68,4 @@ (function () { | ||
write.once('finish', onWriteFinish); | ||
else | ||
read.once('end', onReadEnd); | ||
read.once('end', onReadEnd); | ||
read.once('error', onReadError); | ||
@@ -95,3 +94,3 @@ write.once('error', onWriteError); | ||
onEnd(); | ||
} else if (end || finish) { | ||
} else if (end && (finish || !options.end)) { | ||
rm('error', read, onReadError); | ||
@@ -98,0 +97,0 @@ rm('error', write, onWriteError); |
{ | ||
"name": "pipe-io", | ||
"version": "1.1.24", | ||
"version": "1.1.25", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "Pipe streams and handle events", |
Pipe-io | ||
========= | ||
Pipe streams and handle events. | ||
Pipe [streams](https://github.com/substack/stream-handbook) and handle events. | ||
@@ -14,16 +14,16 @@ ## Install | ||
### pipe | ||
Create pipe between streams and add on callback wich would | ||
handle any error or will be called when everything done. | ||
Create pipe between streams and adds callback wich would | ||
be called once whenever everything is done, or error occures. | ||
```js | ||
var pipe = require('pipe-io'), | ||
fs = require('fs'), | ||
NAME = 'README.md', | ||
NAME2 = 'README2.md', | ||
readStream = fs.createReadStream(NAME), | ||
writeStream = fs.createWritesStream(NAME2); | ||
pipe([readStream, writeStream], function(error) { | ||
console.log(error || 'done'); | ||
}); | ||
var pipe = require('pipe-io'), | ||
fs = require('fs'), | ||
NAME = 'README.md', | ||
NAME2 = 'README2.md', | ||
readStream = fs.createReadStream(NAME), | ||
writeStream = fs.createWritesStream(NAME2); | ||
pipe([readStream, writeStream], function(error) { | ||
console.log(error || 'done'); | ||
}); | ||
``` | ||
@@ -35,10 +35,10 @@ | ||
```js | ||
var pipe = require('pipe-io'), | ||
fs = require('fs'), | ||
NAME = 'README.md', | ||
readStream = fs.createReadStream(NAME); | ||
pipe.getBody(readStream, function(error, data) { | ||
console.log(error || data); | ||
}); | ||
var pipe = require('pipe-io'), | ||
fs = require('fs'), | ||
NAME = 'README.md', | ||
readStream = fs.createReadStream(NAME); | ||
pipe.getBody(readStream, function(error, data) { | ||
console.log(error || data); | ||
}); | ||
``` | ||
@@ -45,0 +45,0 @@ |
Sorry, the diff of this file is not supported yet
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
9618
148