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

eventemitter2

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventemitter2 - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

5

CHANGELOG.md

@@ -9,2 +9,7 @@ # Change Log

## [6.1.0] - 2020-03-19
### Added
- `ignoreErrors` errors option in constructor @DigitalBrainJS
## [5.0.1] - 2018-01-09

@@ -11,0 +16,0 @@

7

eventemitter2.d.ts

@@ -27,3 +27,8 @@ export type eventNS = string[];

*/
verboseMemoryLeak?: boolean;
verboseMemoryLeak?: boolean
/**
* @default false
* @description disable throwing uncaughtException if an error event is emitted and it has no listeners
*/
ignoreErrors?: boolean
}

@@ -30,0 +35,0 @@ export interface Listener {

6

lib/eventemitter2.js

@@ -33,2 +33,3 @@ /*!

conf.verboseMemoryLeak && (this.verboseMemoryLeak = conf.verboseMemoryLeak);
conf.ignoreErrors && (this.ignoreErrors = conf.ignoreErrors);

@@ -398,3 +399,3 @@ if (this.wildcard) {

return true;
} else if (!this._all && type === 'error') {
} else if (!this.ignoreErrors && !this._all && type === 'error') {
if (arguments[1] instanceof Error) {

@@ -405,3 +406,2 @@ throw arguments[1]; // Unhandled 'error' event

}
return false;
}

@@ -501,3 +501,3 @@

}
} else if (!this._all && type === 'error') {
} else if (!this.ignoreErrors && !this._all && type === 'error') {
if (arguments[1] instanceof Error) {

@@ -504,0 +504,0 @@ return Promise.reject(arguments[1]); // Unhandled 'error' event

{
"name": "eventemitter2",
"version": "6.0.0",
"version": "6.1.0",
"description": "A Node.js event emitter implementation with namespaces, wildcards, TTL and browser support.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -57,3 +57,8 @@ [![Codeship](https://img.shields.io/codeship/3ad58940-4c7d-0131-15d5-5a8cd3f550f8.svg?maxAge=2592000)]()

//
verboseMemoryLeak: false
verboseMemoryLeak: false,
//
// disable throwing uncaughtException if an error event is emitted and it has no listeners
//
ignoreErrors: false
});

@@ -60,0 +65,0 @@ ```

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