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

metal-events

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metal-events - npm Package Compare versions

Comparing version 2.5.14 to 2.5.16

9

lib/EventEmitter.js

@@ -193,3 +193,3 @@ 'use strict';

value: function emit(event) {
var listeners = toArray(this.getRawListeners_(event)).concat();
var listeners = this.getRawListeners_(event);
if (listeners.length === 0) {

@@ -207,3 +207,3 @@ return false;

* @param {string} event
* @return {Array}
* @return {!Array}
* @protected

@@ -215,3 +215,4 @@ */

value: function getRawListeners_(event) {
return this.events_ && this.events_[event];
var directListeners = toArray(this.events_ && this.events_[event]);
return directListeners.concat(toArray(this.events_ && this.events_['*']));
}

@@ -241,3 +242,3 @@

value: function listeners(event) {
return toArray(this.getRawListeners_(event)).map(function (listener) {
return this.getRawListeners_(event).map(function (listener) {
return listener.fn ? listener.fn : listener;

@@ -244,0 +245,0 @@ });

{
"name": "metal-events",
"version": "2.5.14",
"version": "2.5.16",
"description": "Classes responsible for emitting and listening to events",

@@ -5,0 +5,0 @@ "license": "BSD",

@@ -141,3 +141,3 @@ 'use strict';

emit(event) {
const listeners = toArray(this.getRawListeners_(event)).concat();
const listeners = this.getRawListeners_(event);
if (listeners.length === 0) {

@@ -155,7 +155,8 @@ return false;

* @param {string} event
* @return {Array}
* @return {!Array}
* @protected
*/
getRawListeners_(event) {
return this.events_ && this.events_[event];
const directListeners = toArray(this.events_ && this.events_[event]);
return directListeners.concat(toArray(this.events_ && this.events_['*']));
}

@@ -179,3 +180,3 @@

listeners(event) {
return toArray(this.getRawListeners_(event)).map(
return this.getRawListeners_(event).map(
listener => listener.fn ? listener.fn : listener

@@ -182,0 +183,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