@evergis/event-emitter
Advanced tools
Comparing version 1.1.3 to 1.1.4
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _classCallCheck(instance, Constructor) { | ||
@@ -6,0 +4,0 @@ if (!(instance instanceof Constructor)) { |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EventEmitter=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.handlers={"*":[]}}var n;return(n=[{key:"on",value:function(e,n){this.handlers[e]||(this.handlers[e]=[]),this.handlers[e].push(n)}},{key:"off",value:function(e,n){if(this.handlers[e]){var t=this.handlers[e].indexOf(n);-1!==t&&this.handlers[e].splice(t,1)}}},{key:"emit",value:function(e,n){this.handlers[e]&&this.handlers[e].map((function(e){return e(n)})),this.handlers["*"].map((function(t){return t(e,n)}))}},{key:"once",value:function(e,n){var t=this;this.on(e,(function r(i){t.off(e,r),n(i)}))}}])&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,n),e}(); | ||
"use strict";exports.EventEmitter=function(){function n(){!function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.handlers={"*":[]}}var e;return(e=[{key:"on",value:function(n,e){this.handlers[n]||(this.handlers[n]=[]),this.handlers[n].push(e)}},{key:"off",value:function(n,e){if(this.handlers[n]){var t=this.handlers[n].indexOf(e);-1!==t&&this.handlers[n].splice(t,1)}}},{key:"emit",value:function(n,e){this.handlers[n]&&this.handlers[n].map((function(n){return n(e)})),this.handlers["*"].map((function(t){return t(n,e)}))}},{key:"once",value:function(n,e){var t=this;this.on(n,(function i(r){t.off(n,i),e(r)}))}}])&&function(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}(n.prototype,e),n}(); | ||
//# sourceMappingURL=event-emitter.cjs.production.min.js.map |
{ | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"license": "MIT", | ||
@@ -7,4 +7,3 @@ "main": "dist/index.js", | ||
"files": [ | ||
"dist", | ||
"src" | ||
"dist" | ||
], | ||
@@ -36,9 +35,3 @@ "engines": { | ||
"module": "dist/event-emitter.esm.js", | ||
"devDependencies": { | ||
"husky": "^4.2.5", | ||
"tsdx": "^0.13.2", | ||
"tslib": "^2.0.1", | ||
"typescript": "^3.9.7" | ||
}, | ||
"gitHead": "a93521b3316ee00c7d8f190b1420ed0adde79f6c" | ||
"gitHead": "0a7d5cb28f4f875f5d22a52b2157d5c5b9fdd484" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
14849
12
158