Comparing version 0.7.4 to 0.7.5
@@ -0,0 +0,0 @@ declare type SupportTarget = HTMLElement | SVGElement; |
@@ -0,0 +0,0 @@ import { __values } from 'tslib'; |
@@ -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=(void 0===r?{}:r).target;void 0===this.listenersMap[t]&&(this.listenersMap[t]=[]),void 0!==i&&(e.target=i),this.listenersMap[t].push(e)},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 s=tslib.__values(o),a=s.next();!a.done;a=s.next()){var l=a.value;r({target:l.target})&&l(e)}}catch(t){i={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}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"),e=function(){function e(){this.listenersMap={}}return e.prototype.target=function(t){var e=this;return{on:function(r,i){e.on(r,i,{target:t})}}},e.prototype.on=function(t,e,r){var i=(void 0===r?{}:r).target;void 0===this.listenersMap[t]&&(this.listenersMap[t]=[]),void 0!==i&&(e.target=i),this.listenersMap[t].push(e)},e.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)}},e.prototype.emit=function(e,r,i){var n,o;void 0===i&&(i=function(){return!0});var s=this.listenersMap[e];if(void 0!==s&&0<s.length)try{for(var a=t.__values(s),l=a.next();!l.done;l=a.next()){var p=l.value;i({target:p.target})&&p(r)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}},e.prototype.destroy=function(){this.listenersMap={}},e}();exports.default=e; |
{ | ||
"name": "any-event", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"description": "小巧的事件模型", | ||
@@ -22,3 +22,3 @@ "main": "dist/index.js", | ||
"sideEffects": false, | ||
"gitHead": "20cfae8bee6e95cca8dd56799f56dd48234556c4" | ||
"gitHead": "d4d3471e164e745d18940a2fd3192362a3a86edf" | ||
} |
@@ -0,0 +0,0 @@ # any-event [![NPM Version][npm-image]][npm-url] [![npm bundle size (minified + gzip)][size-image]][size-url] [![codecov][codecov-image]][codecov-url] [![CircleCI][ci-image]][ci-url] |
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
9964