Comparing version 0.1.7 to 0.1.8
@@ -154,2 +154,8 @@ /* | ||
Tapable.prototype.plugin = function plugin(name, fn) { | ||
if(Array.isArray(name)) { | ||
name.forEach(function(name) { | ||
this.plugin(name, fn); | ||
}, this); | ||
return; | ||
} | ||
if(!this._plugins[name]) this._plugins[name] = [fn]; | ||
@@ -156,0 +162,0 @@ else this._plugins[name].push(fn); |
{ | ||
"name": "tapable", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "Just a little module for plugins.", |
@@ -48,6 +48,6 @@ # Tapable | ||
``` javascript | ||
void plugin(name: string, handler: Function) | ||
void plugin(names: string|string[], handler: Function) | ||
``` | ||
`name` is the name of the plugin interface the class provides. | ||
`names` are the names (or a single name) of the plugin interfaces the class provides. | ||
@@ -54,0 +54,0 @@ `handler` is a callback function. The signature depends on the class. `this` is the instance of the class. |
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
15072
290