Comparing version 0.7.8 to 0.7.9
@@ -1,2 +0,2 @@ | ||
declare type SupportTarget = HTMLElement | SVGElement; | ||
declare type SupportTarget = HTMLElement; | ||
interface Listener { | ||
@@ -3,0 +3,0 @@ (...payload: any): void; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tslib=require("tslib"),default_1=function(){function t(){this.listenersMap={}}return t.prototype.target=function(t){var e=this;return{on:function(r,i){e.on(r,i,{target:t})}}},t.prototype.on=function(t,e,r){var i,n,o=(void 0===r?{}:r).target,a=Array.isArray(t)?t:[t];try{for(var s=tslib.__values(a),l=s.next();!l.done;l=s.next()){var f=l.value;void 0===this.listenersMap[f]&&(this.listenersMap[f]=[]),void 0!==o&&(e.target=o),this.listenersMap[f].push(e)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}},t.prototype.off=function(t,e){var r=this.listenersMap[t];if(void 0!==r)if(void 0===e)delete this.listenersMap[t];else{var i=r.findIndex((function(t){return t===e}));r.splice(i,1)}},t.prototype.emit=function(t,e,r){var i,n;void 0===r&&(r=function(){return!0});var o=this.listenersMap[t];if(void 0!==o&&0<o.length)try{for(var a=tslib.__values(o),s=a.next();!s.done;s=a.next()){var l=s.value;r({target:l.target})&&l(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}},t.prototype.destroy=function(){this.listenersMap={}},t}();exports.default=default_1; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=function(){function r(){this.listenersMap={}}return r.prototype.target=function(t){var r=this;return{on:function(e,n){r.on(e,n,{target:t})}}},r.prototype.on=function(r,e,n){var i,o,a=(void 0===n?{}:n).target,s=Array.isArray(r)?r:[r];try{for(var l=t.__values(s),f=l.next();!f.done;f=l.next()){var u=f.value;void 0===this.listenersMap[u]&&(this.listenersMap[u]=[]),void 0!==a&&(e.target=a),this.listenersMap[u].push(e)}}catch(t){i={error:t}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}},r.prototype.off=function(t,r){var e=this.listenersMap[t];if(void 0!==e)if(void 0===r)delete this.listenersMap[t];else{var n=e.findIndex((function(t){return t===r}));e.splice(n,1)}},r.prototype.emit=function(r,e,n){var i,o;void 0===n&&(n=function(){return!0});var a=this.listenersMap[r];if(void 0!==a&&0<a.length)try{for(var s=t.__values(a),l=s.next();!l.done;l=s.next()){var f=l.value;n({target:f.target})&&f(e)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},r.prototype.destroy=function(){this.listenersMap={}},r}();exports.default=r; |
{ | ||
"name": "any-event", | ||
"version": "0.7.8", | ||
"version": "0.7.9", | ||
"description": "小巧的事件模型", | ||
@@ -22,3 +22,3 @@ "main": "dist/index.js", | ||
"sideEffects": false, | ||
"gitHead": "14f864223c9a4df212561b9a53e93a5f89217b15" | ||
"gitHead": "4d795d9ac1c0cf597db9bc070284f3de7578e5fd" | ||
} |
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
10834