strict-event-emitter
Advanced tools
Comparing version 0.4.5 to 0.4.6
@@ -14,9 +14,2 @@ "use strict"; | ||
class Emitter { | ||
events; | ||
maxListeners; | ||
hasWarnedAboutPotentialMemoryLeak; | ||
static defaultMaxListeners = 10; | ||
static listenerCount(emitter, eventName) { | ||
return emitter.listenerCount(eventName); | ||
} | ||
constructor() { | ||
@@ -27,2 +20,5 @@ this.events = new Map(); | ||
} | ||
static listenerCount(emitter, eventName) { | ||
return emitter.listenerCount(eventName); | ||
} | ||
_emitInternalEvent(internalEventName, eventName, listener) { | ||
@@ -164,1 +160,2 @@ this.emit(internalEventName, | ||
exports.Emitter = Emitter; | ||
Emitter.defaultMaxListeners = 10; |
@@ -5,5 +5,2 @@ "use strict"; | ||
class MemoryLeakError extends Error { | ||
emitter; | ||
type; | ||
count; | ||
constructor(emitter, type, count) { | ||
@@ -10,0 +7,0 @@ super(`Possible EventEmitter memory leak detected. ${count} ${type.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`); |
{ | ||
"name": "strict-event-emitter", | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"description": "Type-safe implementation of EventEmitter for browser and Node.js", | ||
@@ -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
14243
270