Compare commits

...

2 Commits

@ -58,7 +58,7 @@ module.exports = function pipe(_streams) {
if (bound != null) { if (bound != null) {
return Object.assign({}, stream, { return Object.assign({}, stream, {
read: stream.read.bind(null, bound), read: stream.read.bind(null, bound),
abort: stream.abort.bind(null, bound), abort: (reason) => stream.abort(reason, bound), // bindRight equivalent
peek: stream.peek.bind(null, bound) peek: stream.peek.bind(null, bound)
}); });
} else { } else {
@ -97,7 +97,7 @@ module.exports = function pipe(_streams) {
return getPipeline(source).peek(); return getPipeline(source).peek();
} }
}, },
abort: function (source, reason) { abort: function (reason, source) {
if(!verifyFullPipeline(source)) { if(!verifyFullPipeline(source)) {
throw new Error("Cannot abort a partial pipeline; maybe you forgot to specify a source stream?"); throw new Error("Cannot abort a partial pipeline; maybe you forgot to specify a source stream?");
} else { } else {

@ -1,6 +1,6 @@
{ {
"name": "@promistream/pipe", "name": "@promistream/pipe",
"version": "0.1.5", "version": "0.1.6",
"main": "index.js", "main": "index.js",
"repository": "http://git.cryto.net/promistream/pipe.git", "repository": "http://git.cryto.net/promistream/pipe.git",
"author": "Sven Slootweg <admin@cryto.net>", "author": "Sven Slootweg <admin@cryto.net>",

Loading…
Cancel
Save