713e990531
Fixes #6285.
3 lines
296 B
JavaScript
3 lines
296 B
JavaScript
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
|