🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

callback-registry

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

callback-registry - npm Package Compare versions

Comparing version

to
2.5.1

5

index.d.ts

@@ -26,2 +26,7 @@ /**

clear(): void;
/**
* Removes a specific key and its associated callbacks from the registry.
*/
clearKey(key: string): void;
}

@@ -28,0 +33,0 @@

10

lib/index.js

@@ -77,6 +77,14 @@ "use strict";

}
function clearKey(key) {
var callbacksForKey = callbacks[key];
if (!callbacksForKey) {
return;
}
delete callbacks[key];
}
return {
add: add,
execute: execute,
clear: clear
clear: clear,
clearKey: clearKey
};

@@ -83,0 +91,0 @@ }

2

package.json
{
"name": "callback-registry",
"version": "2.4.0",
"version": "2.5.1",
"description": "Registry for callbacks",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -46,2 +46,4 @@ # Intro

# Change log
* 2.5.0
added clearKey method that removes a key from the registry
* 2.3.2

@@ -48,0 +50,0 @@ * fix case where unsubscribe function removes all subscriptions with the same callback reference