Skip to content

Instantly share code, notes, and snippets.

View jansim's full-sized avatar
🚀

Jan Simson jansim

🚀
View GitHub Profile
@jansim
jansim / event.js
Last active November 8, 2019 16:34 — forked from wildlyinaccurate/event.js
Really simple Javascript custom event system (slightly extended to keep listeners and allow whether stuff should be called immediately)
var Event = function () {
var self = this
self.queue = {}
self.fired = []
return {
fire: function (event) {
var queue = self.queue[event]