Socket
Socket
Sign inDemoInstall

tapable

Package Overview
Dependencies
Maintainers
1
Versions
48
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 0.1.3 to 0.1.4

19

lib/Tapable.js

@@ -59,2 +59,21 @@ /*

Tapable.prototype.applyPluginsAsyncSeries = function applyPluginsAsyncSeries(name) {
var args = Array.prototype.slice.call(arguments, 1);
var callback = args.pop();
if(!this._plugins[name] || this._plugins[name].length == 0) return callback();
var plugins = this._plugins[name];
var old = this._currentPluginApply;
this._currentPluginApply = 0;
args.push(function next(err) {
if(err) return callback(err);
this._currentPluginApply++;
if(this._currentPluginApply >= plugins.length) {
this._currentPluginApply = old;
return callback();
}
plugins[this._currentPluginApply].apply(this, args);
}.bind(this));
plugins[0].apply(this, args);
};
Tapable.prototype.applyPluginsAsyncWaterfall = function applyPluginsAsyncWaterfall(name, init, callback) {

@@ -61,0 +80,0 @@ if(!this._plugins[name] || this._plugins[name].length == 0) return callback(null, init);

2

package.json
{
"name": "tapable",
"version": "0.1.3",
"version": "0.1.4",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "Just a little module for plugins.",

@@ -96,2 +96,12 @@ # Tapable

``` javascript
applyPluginsAsyncSeries(
name: string,
args: any...,
callback: (err: Error, result: any) -> void
)
```
Asynchronously applies all registered handers for `name`. The hander functions are called with all `args` and a callback function with the signature `(err: Error) -> void`. The handers are called in series, one at a time. After all handlers are applied, `callback` is called. If any handler passes a value for `err`, the `callback` is called with this error and no more handlers are called.
``` javascript
applyPluginsParallel(

@@ -98,0 +108,0 @@ name: string,

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc