callback-registry
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -11,3 +11,3 @@ "use strict"; | ||
callbacksForKey.push(callback); | ||
return () => { | ||
return function () { | ||
var allForKey = callbacks[key]; | ||
@@ -17,3 +17,3 @@ if (!allForKey) { | ||
} | ||
allForKey = allForKey.reduce((acc, element, index) => { | ||
allForKey = allForKey.reduce(function (acc, element, index) { | ||
if (!(element === callback && acc.length === index)) { | ||
@@ -27,3 +27,7 @@ acc.push(element); | ||
} | ||
function execute(key, ...argumentsArr) { | ||
function execute(key) { | ||
var argumentsArr = []; | ||
for (var _i = 1; _i < arguments.length; _i++) { | ||
argumentsArr[_i - 1] = arguments[_i]; | ||
} | ||
var callbacksForKey = callbacks[key]; | ||
@@ -30,0 +34,0 @@ if (!callbacksForKey || callbacksForKey.length === 0) { |
{ | ||
"name": "callback-registry", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "Registry for callbacks", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5947
86