Comparing version 0.7.2 to 0.7.3
@@ -238,7 +238,8 @@ 'use strict'; | ||
var before = emitter.listeners(type); | ||
origMethod.call(emitter, type, cb); | ||
var ret = origMethod.call(emitter, type, cb); | ||
var after = emitter.listeners(type); | ||
return after.filter(function(handler) { | ||
var newListeners = after.filter(function(handler) { | ||
return before.indexOf(handler) === -1; | ||
}); | ||
return [ret, newListeners]; | ||
} | ||
@@ -260,3 +261,4 @@ | ||
var newListeners = addListener(this, origMethod, type, fn); | ||
var res = addListener(this, origMethod, type, fn); | ||
var ret = res[0], newListeners = res[1]; | ||
newListeners.forEach(function (listener) { | ||
@@ -282,2 +284,3 @@ // I've tried to avoid mutating anything that's not mine, however | ||
}); | ||
return ret; | ||
}; | ||
@@ -284,0 +287,0 @@ }); |
{ | ||
"name": "wtfnode", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Utility to help find out why Node isn't exiting", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
30061
586