chiffchaff-pipe
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -28,3 +28,3 @@ 'use strict'; | ||
function PipeTask(source, destination) { | ||
function PipeTask(source, destination, options) { | ||
_classCallCheck(this, PipeTask); | ||
@@ -35,2 +35,3 @@ | ||
this._destination = destination; | ||
this._options = options; | ||
} | ||
@@ -44,5 +45,5 @@ | ||
return new _bluebird2['default'](function (resolve, reject) { | ||
_this._source.once('error', reject); | ||
_this._source.once('end', resolve).once('error', reject); | ||
_this._destination.once('error', reject); | ||
_this._source.pipe(_this._destination).once('finish', resolve).once('error', reject); | ||
_this._source.pipe(_this._destination, _this._options).once('error', reject); | ||
}).cancellable()['catch'](_bluebird2['default'].CancellationError, function (err) { | ||
@@ -49,0 +50,0 @@ _this._source.unpipe(_this._destination); |
{ | ||
"name": "chiffchaff-pipe", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Stream piping for chiffchaff.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
5091
45