summaryrefslogtreecommitdiffstats
path: root/remote/test/puppeteer/vendor/mitt/dist/mitt.modern.js
blob: 0777f6de720932660a398d9109232104d85b1329 (plain)
1
2
export default function(e){return{all:e=e||new Map,on(t,n){const s=e.get(t);s&&s.push(n)||e.set(t,[n])},off(t,n){const s=e.get(t);s&&s.splice(s.indexOf(n)>>>0,1)},emit(t,n){(e.get(t)||[]).slice().map(e=>{e(n)}),(e.get("*")||[]).slice().map(e=>{e(t,n)})}}}
//# sourceMappingURL=mitt.modern.js.map