stack-base-iterator
Advanced tools
@@ -35,6 +35,2 @@ var FIFO = require('fifo'); | ||
| this.end(err); | ||
| this.options = null; | ||
| this.processors = null; | ||
| this.queued = null; | ||
| this.stack = null; | ||
| }; | ||
@@ -49,3 +45,3 @@ | ||
| StackBaseIterator.prototype.end = function end(err) { | ||
| // if (this.done) console.log('Already ended'); | ||
| if (this.done) return; | ||
| this.done = true; | ||
@@ -97,7 +93,6 @@ while (this.processors.length) this.processors.pop()(err || true); | ||
| var processor = createProcesor(this.next.bind(this), options, function processorCallback(err, done) { | ||
| var processor = createProcesor(this.next.bind(this), options, function processorCallback(err) { | ||
| if (!self.destroyed) fifoRemove(self.processors, processor); | ||
| processor = null; | ||
| options = null; | ||
| if ((err || done) && !self.done) self.end(err); | ||
| return callback(err, self.done ? true : !self.stack.length); | ||
@@ -104,0 +99,0 @@ }); |
+1
-1
| { | ||
| "name": "stack-base-iterator", | ||
| "version": "0.1.3", | ||
| "version": "0.1.4", | ||
| "description": "Base iterator for values retrieved using a stack of async functions returning values", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
9901
-1.76%153
-3.16%