emit-logger
Advanced tools
Comparing version 0.0.2 to 0.0.4
0.0.4 / 2013-07-04 | ||
================== | ||
* fix leaking event listener | ||
0.0.3 / 2013-07-04 | ||
================== | ||
* restore emit method on removed | ||
0.0.2 / 2013-07-04 | ||
@@ -3,0 +13,0 @@ ================== |
12
index.js
@@ -50,2 +50,10 @@ /** | ||
}; | ||
this.on('remove', onremove); | ||
function onremove(removedEmitter) { | ||
if (emitter !== removedEmitter) return; | ||
removedEmitter.emit = emit; | ||
self.removeListener('remove', onremove); | ||
} | ||
@@ -66,3 +74,3 @@ this._emitters.push(emitter); | ||
this._emitters = this._emitters.filter(function(e) { | ||
return e == emitter; | ||
return e !== emitter; | ||
}); | ||
@@ -73,4 +81,4 @@ | ||
} | ||
return this; | ||
}; |
{ | ||
"name": "emit-logger", | ||
"version": "0.0.2", | ||
"version": "0.0.4", | ||
"description": "event logger for EventEmitter", | ||
@@ -5,0 +5,0 @@ "keywords": ["EventEmitter", "event", "log", "logging", "logger"], |
3442
82