This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EventSystem { | |
constructor() { | |
this.queue = {}; | |
} | |
publish(event, data) { | |
let queue = this.queue[event]; | |
if (typeof queue === 'undefined') { | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";var e="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e,t){return e(t={exports:{}},t.exports),t.exports}var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o=!1;function s(){o=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)n[t]=e[t],i[e.charCodeAt(t)]=t;i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63}function h(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16)+(e[s+1]<<8)+e[s+2],o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}function u(e){var t;o||s();for(var r=e.length,i=r%3,a="",u=[],f=0,l=r-i;f<l;f+=16383)u.push(h(e,f,f+16383>l?l:f+16383));return 1===i?(t=e[r-1],a+=n[t>>2],a+=n[t<<4&63],a+="=="):2===i& |