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

angular-es-utils

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-es-utils - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

25

event-bus/index.js

@@ -77,5 +77,2 @@ 'use strict';

dispatch: function dispatch(topic) {
var listeners = topics[topic] || [];
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {

@@ -85,11 +82,23 @@ args[_key2 - 1] = arguments[_key2];

for (var i = 0; i < listeners.length; i++) {
var listeners = topics[topic] || [];
var listenersToBeRemoved = [];
if ((0, _typeAuth.isFunction)(listeners[i])) {
listeners[i].apply(null, args);
listeners.forEach(function (listener) {
if (listener === null) {
listenersToBeRemoved.push(listener);
} else {
console.error('事件总线分发 %s 消息失败,注册的listener不是函数类型!', topic);
if ((0, _typeAuth.isFunction)(listener)) {
listener.apply(null, args);
} else {
console.error('事件总线分发 %s 消息失败,注册的listener不是函数类型!', topic);
}
}
}
});
// 清空空值的 listener
listenersToBeRemoved.forEach(function (emptyListener) {
return listeners.splice(listeners.indexOf(emptyListener), 1);
});
return this;

@@ -96,0 +105,0 @@ },

{
"name": "angular-es-utils",
"version": "2.1.1",
"version": "2.1.2",
"description": "es utils design for angular1.x",

@@ -5,0 +5,0 @@ "main": "./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