diff --git a/lib/pipeline.js b/lib/pipeline.js index 9dee03e..ae22bdd 100644 --- a/lib/pipeline.js +++ b/lib/pipeline.js @@ -1,4 +1,4 @@ -var Pipeline = module.exports = function (controller) { +let Pipeline = module.exports = function (controller) { this.steps = []; this.controller = controller; } @@ -8,8 +8,8 @@ Pipeline.prototype.addStep = function (step) { } Pipeline.prototype.run = function (frame) { - var stepsLength = this.steps.length; - for (var i = 0; i != stepsLength; i++) { + let stepsLength = this.steps.length; + for (let i = 0; i != stepsLength; i++) { if (!frame) break; frame = this.steps[i](frame); } @@ -17,7 +17,7 @@ Pipeline.prototype.run = function (frame) { } Pipeline.prototype.removeStep = function(step){ - var index = this.steps.indexOf(step); + let index = this.steps.indexOf(step); if (index === -1) throw "Step not found in pipeline"; this.steps.splice(index, 1); } @@ -36,9 +36,9 @@ Pipeline.prototype.removeStep = function(step){ * @private */ Pipeline.prototype.addWrappedStep = function (type, callback) { - var controller = this.controller, + let controller = this.controller, step = function (frame) { - var dependencies, i, len; + let dependencies, i, len; dependencies = (type == 'frame') ? [frame] : (frame[type + 's'] || []); for (i = 0, len = dependencies.length; i < len; i++) { @@ -50,4 +50,4 @@ Pipeline.prototype.addWrappedStep = function (type, callback) { this.addStep(step); return step; -}; \ No newline at end of file +};