easy-eventbus
Advanced tools
Comparing version 0.3.0 to 0.3.2
@@ -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; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
0
0
11388
41
5
119
1
- Removedbabel-polyfill@^6.26.0
- Removedcz-conventional-changelog@^2.1.0
- Removedts-loader@^5.3.2
- Removedtypescript@^3.1.2
- Removedansi-styles@3.2.1(transitive)
- Removedarr-diff@4.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarr-union@3.1.0(transitive)
- Removedarray-unique@0.3.2(transitive)
- Removedassign-symbols@1.0.0(transitive)
- Removedatob@2.1.2(transitive)
- Removedbabel-polyfill@6.26.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedbase@0.11.2(transitive)
- Removedbig.js@5.2.2(transitive)
- Removedbraces@2.3.2(transitive)
- Removedcache-base@1.0.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedclass-utils@0.3.6(transitive)
- Removedcollection-visit@1.0.0(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedcomponent-emitter@1.3.1(transitive)
- Removedconventional-commit-types@2.3.0(transitive)
- Removedcopy-descriptor@0.1.1(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedcz-conventional-changelog@2.1.0(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddefine-property@0.2.51.0.02.0.2(transitive)
- Removedemojis-list@3.0.0(transitive)
- Removedenhanced-resolve@4.5.0(transitive)
- Removederrno@0.1.8(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedexpand-brackets@2.1.4(transitive)
- Removedextend-shallow@2.0.13.0.2(transitive)
- Removedextglob@2.0.4(transitive)
- Removedfill-range@4.0.0(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfragment-cache@0.2.1(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-value@2.0.6(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedhas-value@0.3.11.0.0(transitive)
- Removedhas-values@0.1.41.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-accessor-descriptor@1.0.1(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-data-descriptor@1.0.1(transitive)
- Removedis-descriptor@0.1.71.0.3(transitive)
- Removedis-extendable@0.1.11.0.1(transitive)
- Removedis-number@3.0.0(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisarray@1.0.0(transitive)
- Removedisobject@2.1.03.0.1(transitive)
- Removedjson5@1.0.2(transitive)
- Removedkind-of@3.2.24.0.06.0.3(transitive)
- Removedloader-utils@1.4.2(transitive)
- Removedlodash.map@4.6.0(transitive)
- Removedlongest@1.0.1(transitive)
- Removedmap-cache@0.2.2(transitive)
- Removedmap-visit@1.0.0(transitive)
- Removedmemory-fs@0.5.0(transitive)
- Removedmicromatch@3.1.10(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmixin-deep@1.3.2(transitive)
- Removedms@2.0.0(transitive)
- Removednanomatch@1.2.13(transitive)
- Removedobject-copy@0.1.0(transitive)
- Removedobject-visit@1.0.1(transitive)
- Removedobject.pick@1.3.0(transitive)
- Removedpascalcase@0.1.1(transitive)
- Removedposix-character-classes@0.1.1(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedprr@1.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedregenerator-runtime@0.10.50.11.1(transitive)
- Removedregex-not@1.0.2(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedresolve-url@0.2.1(transitive)
- Removedret@0.1.15(transitive)
- Removedright-pad@1.0.1(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsafe-regex@1.1.0(transitive)
- Removedsemver@5.7.2(transitive)
- Removedset-value@2.0.1(transitive)
- Removedsnapdragon@0.8.2(transitive)
- Removedsnapdragon-node@2.1.1(transitive)
- Removedsnapdragon-util@3.0.1(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-resolve@0.5.3(transitive)
- Removedsource-map-url@0.4.1(transitive)
- Removedsplit-string@3.1.0(transitive)
- Removedstatic-extend@0.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedtapable@1.1.3(transitive)
- Removedto-object-path@0.3.0(transitive)
- Removedto-regex@3.0.2(transitive)
- Removedto-regex-range@2.1.1(transitive)
- Removedts-loader@5.4.5(transitive)
- Removedtypescript@3.9.10(transitive)
- Removedunion-value@1.0.1(transitive)
- Removedunset-value@1.0.0(transitive)
- Removedurix@0.1.0(transitive)
- Removeduse@3.1.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedword-wrap@1.2.5(transitive)