Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 2.4.0 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

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