mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
3 lines
293 B
JavaScript
3 lines
293 B
JavaScript
|
export default function(e){return 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
|