Comparing version 0.2.3 to 0.2.4
@@ -38,2 +38,11 @@ /* | ||
Tapable.prototype.applyPluginsWaterfall0 = function applyPluginsWaterfall0(name, init) { | ||
var plugins = this._plugins[name]; | ||
if(!plugins) return init; | ||
var current = init; | ||
for(var i = 0; i < plugins.length; i++) | ||
current = plugins[i].call(this, current); | ||
return current; | ||
}; | ||
Tapable.prototype.applyPluginsBailResult = function applyPluginsBailResult(name) { | ||
@@ -68,2 +77,3 @@ if(!this._plugins[name]) return; | ||
var i = 0; | ||
var _this = this; | ||
args.push(copyProperties(callback, function next(err) { | ||
@@ -75,4 +85,4 @@ if(err) return callback(err); | ||
} | ||
plugins[i].apply(this, args); | ||
}.bind(this))); | ||
plugins[i].apply(_this, args); | ||
})); | ||
plugins[0].apply(this, args); | ||
@@ -100,5 +110,6 @@ }; | ||
Tapable.prototype.applyPluginsAsyncSeriesBailResult1 = function applyPluginsAsyncSeriesBailResult1(name, param, callback) { | ||
if(!this._plugins[name] || this._plugins[name].length === 0) return callback(); | ||
var plugins = this._plugins[name]; | ||
if(!plugins || plugins.length === 0) return callback(); | ||
var i = 0; | ||
var _this = this; | ||
var innerCallback = copyProperties(callback, function next(err, result) { | ||
@@ -110,3 +121,3 @@ if(arguments.length > 0) return callback(err, result); | ||
} | ||
plugins[i].call(this, param, innerCallback); | ||
plugins[i].call(_this, param, innerCallback); | ||
}); | ||
@@ -128,3 +139,3 @@ plugins[0].call(this, param, innerCallback); | ||
plugins[i].call(_this, value, next); | ||
}.bind(this)); | ||
}); | ||
plugins[0].call(this, init, next); | ||
@@ -187,4 +198,4 @@ }; | ||
Tapable.prototype.applyPluginsParallelBailResult1 = function applyPluginsParallelBailResult1(name, param, callback) { | ||
if(!this._plugins[name] || this._plugins[name].length === 0) return callback(); | ||
var plugins = this._plugins[name]; | ||
if(!plugins || plugins.length === 0) return callback(); | ||
var currentPos = plugins.length; | ||
@@ -191,0 +202,0 @@ var currentResult; |
{ | ||
"name": "tapable", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "Just a little module for plugins.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16839
354