HEX
Server: Apache/2.4.18 (Ubuntu)
System: Linux ubuntu 7.0.5-x86_64-linode173 #1 SMP PREEMPT_DYNAMIC Fri May 8 10:12:05 EDT 2026 x86_64
User: root (0)
PHP: 7.2.28-1+ubuntu16.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //opt/code/node_modules/webpack/node_modules/tapable/package.json
{
  "name": "tapable",
  "version": "0.2.8",
  "author": {
    "name": "Tobias Koppers @sokra"
  },
  "description": "Just a little module for plugins.",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "http://github.com/webpack/tapable.git"
  },
  "devDependencies": {
    "mocha": "^2.2.4",
    "should": "^5.2.0"
  },
  "engines": {
    "node": ">=0.6"
  },
  "files": [
    "lib"
  ],
  "homepage": "https://github.com/webpack/tapable",
  "main": "lib/Tapable.js",
  "scripts": {
    "test": "mocha --reporter spec"
  },
  "readme": "# Tapable\r\n\r\n``` javascript\r\nvar Tapable = require(\"tapable\");\r\n```\r\n\r\n`Tapable` is a class for plugin binding and applying.\r\n\r\nJust extend it.\r\n\r\n``` javascript\r\nfunction MyClass() {\r\n\tTapable.call(this);\r\n}\r\n\r\nMyClass.prototype = Object.create(Tapable.prototype);\r\n\r\nMyClass.prototype.method = function() {};\r\n```\r\n\r\nOr mix it in.\r\n\r\n``` javascript\r\nfunction MyClass2() {\r\n\tEventEmitter.call(this);\r\n\tTapable.call(this);\r\n}\r\n\r\nMyClass2.prototype = Object.create(EventEmitter.prototype);\r\nTapable.mixin(MyClass2.prototype);\r\n\r\nMyClass2.prototype.method = function() {};\r\n```\r\n\r\n## Public functions\r\n\r\n### apply\r\n\r\n``` javascript\r\nvoid apply(plugins: Plugin...)\r\n```\r\n\r\nAttaches all plugins passed as arguments to the instance, by calling `apply` on them.\r\n\r\n### plugin\r\n\r\n``` javascript\r\nvoid plugin(names: string|string[], handler: Function)\r\n```\r\n\r\n`names` are the names (or a single name) of the plugin interfaces the class provides.\r\n\r\n`handler` is a callback function. The signature depends on the class. `this` is the instance of the class.\r\n\r\n## Protected functions\r\n\r\n### applyPlugins\r\n\r\n``` javascript\r\nvoid applyPlugins(name: string, args: any...)\r\n```\r\n\r\nSynchronously applies all registered handlers for `name`. The handler functions are called with all args.\r\n\r\n### applyPluginsWaterfall\r\n\r\n``` javascript\r\nany applyPluginsWaterfall(name: string, init: any, args: any...)\r\n```\r\n\r\nSynchronously applies all registered handlers for `name`. The handler functions are called with the return value of the previous handler and all args. For the first handler `init` is used and the return value of the last handler is return by `applyPluginsWaterfall`\r\n\r\n### applyPluginsAsync\r\n\r\n``` javascript\r\nvoid applyPluginsAsync(\r\n\tname: string,\r\n\targs: any...,\r\n\tcallback: (err?: Error) -> void\r\n)\r\n```\r\n\r\nAsynchronously applies all registered handlers for `name`. The handler functions are called with all args and a callback function with the signature `(err?: Error) -> void`. The handler functions are called in order of registration.\r\n\r\n`callback` is called after all handlers are called.\r\n\r\n### applyPluginsBailResult\r\n\r\n``` javascript\r\nany applyPluginsBailResult(name: string, args: any...)\r\n```\r\n\r\nSynchronously applies all registered handlers for `name`. The handler function are called with all args. If a handler function returns something `!== undefined`, the value is returned and no more handlers are applied.\r\n\r\n### applyPluginsAsyncWaterfall\r\n\r\n``` javascript\r\napplyPluginsAsyncWaterfall(\r\n\tname: string,\r\n\tinit: any,\r\n\tcallback: (err: Error, result: any) -> void\r\n)\r\n```\r\n\r\nAsynchronously applies all registered handlers for `name`. The handler functions are called with the current value and a callback function with the signature `(err: Error, nextValue: any) -> void`. When called, `nextValue` is the current value for the next handler. The current value for the first handler is `init`. After all handlers are applied, `callback` is called with the last value. If any handler passes a value for `err`, the `callback` is called with this error and no more handlers are called.\r\n\r\n### applyPluginsAsyncSeries\r\n\r\n``` javascript\r\napplyPluginsAsyncSeries(\r\n\tname: string,\r\n\targs: any...,\r\n\tcallback: (err: Error, result: any) -> void\r\n)\r\n```\r\n\r\nAsynchronously applies all registered handlers for `name`. The handler functions are called with all `args` and a callback function with the signature `(err: Error) -> void`. The handlers 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.\r\n\r\n### applyPluginsParallel\r\n\r\n``` javascript\r\napplyPluginsParallel(\r\n\tname: string,\r\n\targs: any...,\r\n\tcallback: (err?: Error) -> void\r\n)\r\n```\r\n\r\nApplies all registered handlers for `name` in parallel. The handler functions are called with all args and a callback function with the signature `(err?: Error) -> void`. The `callback` function is called when all handlers have called the callback without `err`. If any handler calls the callback with `err`, `callback` is invoked with this error and the other handlers are ignored.\r\n\r\n### applyPluginsParallelBailResult\r\n\r\n``` javascript\r\napplyPluginsParallelBailResult(\r\n\tname: string,\r\n\targs: any...,\r\n\tcallback: (err: Error, result: any) -> void\r\n)\r\n```\r\n\r\nApplies all registered handlers for `name` in parallel. The handler functions are called with all args and a callback function with the signature `(err?: Error) -> void`. Handler functions must call the callback. They can either pass an error, pass undefined, or pass a value. The first result (either error or value) which is not undefined is passed to the `callback`. The order is defined by registration, not by the speed of the handler function.\r\n\r\n### hasPlugins\r\n\r\n``` js\r\nhasPlugins(\r\n\tname: string\r\n)\r\n```\r\n\r\nReturns true, if plugins are registered for this name.\r\n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/webpack/tapable/issues"
  },
  "_id": "tapable@0.2.8",
  "dist": {
    "shasum": "281a9a18e8eeeeffeb01e640dc785884597bad00"
  },
  "_from": "tapable@~0.2.5",
  "_resolved": "http://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz"
}