You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

tapable

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tapable - npm Package Compare versions

Comparing version

to
0.1.8

6

lib/Tapable.js

@@ -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);

2

package.json
{
"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.