Comparing version 0.9.1 to 0.9.2
(function () { | ||
'use strict'; | ||
var Util = require('util-io'), | ||
var Util = require('../util'), | ||
fs = require('fs'), | ||
@@ -46,4 +46,4 @@ zlib = require('zlib'); | ||
Util.extend(optionsRead, { | ||
start : o.range.start, | ||
end : o.range.end, | ||
start : o.range.start, | ||
end : o.range.end, | ||
}); | ||
@@ -53,7 +53,7 @@ | ||
if (isStrRead) | ||
read = fs.createReadStream(read, optionsRead); | ||
read = fs.createReadStream(read, optionsRead); | ||
if (isStrWrite) { | ||
write = fs.createWriteStream(write); | ||
isFsWrite = true; | ||
write = fs.createWriteStream(write); | ||
isFsWrite = true; | ||
} | ||
@@ -107,2 +107,4 @@ | ||
Util.checkArgs(arguments, ['readStream', 'callback']); | ||
readStream.on('data', function(chunk) { | ||
@@ -113,9 +115,9 @@ body += chunk; | ||
readStream.once('error', function(error) { | ||
Util.exec.ret(callback, error); | ||
callback(error); | ||
}); | ||
readStream.once('end', function() { | ||
Util.exec(callback, null, body); | ||
callback(null, body); | ||
}); | ||
} | ||
})(); |
{ | ||
"name": "pipe-io", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
"description": "Pipe streams and handle events", | ||
"homepage": "http://github.com/coderaiser/util-pipe", | ||
"homepage": "http://github.com/coderaiser/pipe-io", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/coderaiser/util-pipe.git" | ||
"url": "git://github.com/coderaiser/pipe-io.git" | ||
}, | ||
@@ -11,0 +11,0 @@ "dependencies": { |
@@ -1,2 +0,2 @@ | ||
Util Pipe | ||
Pipe-io | ||
========= | ||
@@ -3,0 +3,0 @@ ### create |
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
6449
129