New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

easy-eventbus

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-eventbus - npm Package Compare versions

Comparing version 0.3.0 to 0.3.2

2

dist/eventBus.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.eventBus=e():t.eventBus=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";r.r(e);var n=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var s=arguments[e],o=0,u=s.length;o<u;o++,i++)n[i]=s[o];return n},i=function(){function t(t){this.listeners=[],this.id=-1,Object.defineProperty(this,"id",{value:t,writable:!1})}return t.prototype.addListener=function(t,e){var r=0;this.listeners.some((function(e,n){var i=e.type===t;return i&&(r=n),i}))?(console.warn("EasEventBus: 添加的事件 "+t+" 有重复,已覆盖"),this.listeners[r]={type:t,func:e}):this.listeners.push({type:t,func:e})},t.prototype.addListeners=function(t){var e=this,r=this.listeners.map((function(t){return t.type}));t.forEach((function(t){var n=t.type,i=t.fn;r.includes(n)?(console.warn("EasEventBus: 添加的事件 "+n+" 有重复,已覆盖"),e.listeners=e.listeners.map((function(t){return t.type===n?{type:n,func:i}:t}))):e.listeners.push({type:n,func:i})}))},t.prototype.removeListener=function(t){this.listeners=this.listeners.filter((function(e){return e.type!==t}))},t.prototype.removeListeners=function(t){this.listeners=this.listeners.filter((function(e){return!t.includes(e.type)}))},t.prototype.removeAllListener=function(){this.listeners=[]},t.prototype.getListener=function(){return this.listeners},t}(),s=function(){function t(){this.subscribers=[],this.id=0,this.count=0}return t.prototype.createSubscriber=function(){this.count+=1,this.$emit("create"),this.id+=1;var t=this.id;return this.subscribers.push(new i(t)),this.subscribers[this.subscribers.length-1]},t.prototype.$emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.subscribers.forEach((function(r){r.listeners.some((function(r){return r.type===t&&(r.func.apply(r,e),!0)}))}))},t.prototype.dispatch=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.$emit.apply(this,n([t],e))},t.prototype.removeSubscriber=function(t){var e=this;return this.subscribers.some((function(r,n){return r.id===t&&(e.subscribers[n]=null,e.subscribers.splice(n,1),e.count-=1,!0)}))},t.prototype.removeAllSubscriber=function(){this.count=0,this.subscribers=[]},t.prototype.getSubscriber=function(t){return t?this.subscribers.filter((function(e){return e.id===t}))[0]:this.subscribers},t}();e.default=s}])}));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.eventBus=e():t.eventBus=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";r.r(e),r.d(e,"EasySubscriber",(function(){return n}));var n=function(){function t(t){this.listeners=[],this.id=-1,Object.defineProperty(this,"id",{value:t,writable:!1})}return t.prototype.addListener=function(t,e){var r=0;this.listeners.some((function(e,n){var i=e.type===t;return i&&(r=n),i}))?(console.warn("EasEventBus: 添加的事件 "+t+" 有重复,已覆盖"),this.listeners[r]={type:t,func:e}):this.listeners.push({type:t,func:e})},t.prototype.addListeners=function(t){var e=this,r=this.listeners.map((function(t){return t.type}));t.forEach((function(t){var n=t.type,i=t.fn;r.includes(n)?(console.warn("EasEventBus: 添加的事件 "+n+" 有重复,已覆盖"),e.listeners=e.listeners.map((function(t){return t.type===n?{type:n,func:i}:t}))):e.listeners.push({type:n,func:i})}))},t.prototype.removeListener=function(t){this.listeners=this.listeners.filter((function(e){return e.type!==t}))},t.prototype.removeListeners=function(t){this.listeners=this.listeners.filter((function(e){return!t.includes(e.type)}))},t.prototype.removeAllListener=function(){this.listeners=[]},t.prototype.getListener=function(){return this.listeners},t}(),i=function(){function t(){this.subscribers=[],this.subscribers=[],this.id=0,this.count=0}return t.prototype.createSubscriber=function(){this.count+=1,this.$emit("create"),this.id+=1;var t=this.id;return this.subscribers.push(new n(t)),this.subscribers[this.subscribers.length-1]},t.prototype.$emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.subscribers.forEach((function(r){r.listeners.some((function(r){return r.type===t&&(r.func.apply(r,e),!0)}))}))},t.prototype.dispatch=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.$emit.apply(this,[t].concat(e))},t.prototype.removeSubscriber=function(t){var e=this;return this.subscribers.some((function(r,n){return r.id===t&&(e.subscribers[n]=null,e.subscribers.splice(n,1),e.count-=1,!0)}))},t.prototype.removeAllSubscriber=function(){this.count=0,this.subscribers=[]},t.prototype.getSubscriber=function(t){return t?this.subscribers.filter((function(e){return e.id===t}))[0]:this.subscribers},t}();e.default=i}])}));
{
"name": "easy-eventbus",
"version": "0.3.0",
"version": "0.3.2",
"description": "this is a library for eventbus",

@@ -28,5 +28,7 @@ "main": "index.js",

"babel-loader": "^7.1.4",
"babel-polyfill": "^6.26.0",
"chai": "^4.1.2",
"cross-env": "^5.1.4",
"css-loader": "^0.28.11",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^4.19.1",

@@ -59,2 +61,4 @@ "eslint-config-standard": "^11.0.0",

"style-loader": "^0.20.3",
"ts-loader": "^5.3.2",
"typescript": "^3.1.2",
"uglifyjs-webpack-plugin": "^1.2.4",

@@ -65,8 +69,2 @@ "webpack": "^4.19.0",

},
"dependencies": {
"babel-polyfill": "^6.26.0",
"cz-conventional-changelog": "^2.1.0",
"ts-loader": "^5.3.2",
"typescript": "^3.1.2"
},
"pluginName": "eventBus",

@@ -77,3 +75,7 @@ "config": {

}
}
},
"files": [
"dist",
"types"
]
}

@@ -117,2 +117,3 @@ /**

}
export { EasyListener, EasySubscriber };
export default EasyEventbus;
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