aboutsummaryrefslogtreecommitdiff
path: root/node_modules/map-stream/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/map-stream/index.js')
-rw-r--r--node_modules/map-stream/index.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/node_modules/map-stream/index.js b/node_modules/map-stream/index.js
index bff007014..cbf397065 100644
--- a/node_modules/map-stream/index.js
+++ b/node_modules/map-stream/index.js
@@ -15,7 +15,6 @@ var Stream = require('stream').Stream
module.exports = function (mapper, opts) {
var stream = new Stream()
- , self = this
, inputs = 0
, outputs = 0
, ended = false
@@ -24,8 +23,8 @@ module.exports = function (mapper, opts) {
, lastWritten = 0
, inNext = false
- this.opts = opts || {};
- var errorEventName = this.opts.failures ? 'failure' : 'error';
+ opts = opts || {};
+ var errorEventName = opts.failures ? 'failure' : 'error';
// Items that are not ready to be written yet (because they would come out of
// order) get stuck in a queue for later.
@@ -67,7 +66,7 @@ module.exports = function (mapper, opts) {
if(destroyed) return
inNext = true
- if (!err || self.opts.failures) {
+ if (!err || opts.failures) {
queueData(data, number)
}