Socket
Socket
Sign inDemoInstall

tapable

Package Overview
Dependencies
0
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-beta.0 to 1.0.0-beta.1

16

lib/Hook.js

@@ -94,2 +94,18 @@ /*

withOptions(options) {
const mergeOptions = opt => Object.assign({}, options, typeof opt === "string" ? { name: opt } : opt);
// Prevent creating endless prototype chains
options = Object.assign({}, this._withOptions);
const base = this._withOptionsBase || this;
const newHook = Object.create(base);
newHook.tapAsync = (opt, fn) => base.tapAsync(mergeOptions(opt), fn),
newHook.tap = (opt, fn) => base.tap(mergeOptions(opt), fn);
newHook.tapPromise = (opt, fn) => base.tapPromise(mergeOptions(opt), fn);
newHook._withOptions = options;
newHook._withOptionsBase = options;
return newHook;
}
isUsed() {

@@ -96,0 +112,0 @@ return this.taps.length > 0 || this.interceptors.length > 0;

2

package.json
{
"name": "tapable",
"version": "1.0.0-beta.0",
"version": "1.0.0-beta.1",
"author": "Tobias Koppers @sokra",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc