Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strict-event-emitter

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strict-event-emitter - npm Package Compare versions

Comparing version 0.4.5 to 0.4.6

11

lib/Emitter.js

@@ -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",

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