UNPKG

@stories-js/core

Version:

Stories web components to build stories

5 lines 429 B
/*! * (C) StoriesJS https://storiesjs.org - GPL-2.0 License */ const t={};const c=(c,o)=>{if(!t[c]){t[c]=[]}const n=t[c].find((t=>t===o));if(!n){t[c].push(o)}};const o=(c,o)=>{if(t[c]){t[c]=t[c].filter((t=>t!==o))}};const n=()=>{Object.keys(t).forEach((c=>{t[c]=[]}))};const s=(c,o)=>{if(t[c]){t[c].forEach((t=>{try{t(o)}catch(c){}}))}};const f={on:c,off:o,clear:n,emit:s};export{f as m}; //# sourceMappingURL=p-e9f23957.js.map