Skip to content

Instantly share code, notes, and snippets.

View hejrobin's full-sized avatar
👠

Robin Grass hejrobin

👠
View GitHub Profile
@bloodyowl
bloodyowl / gist:41b1de3388c626796eca
Last active April 20, 2020 03:27
es6 event-emitter
var DEFAULT_MAX_LISTENERS = 12
function error(message, ...args){
console.error.apply(console, [message].concat(args))
console.trace()
}
class EventEmitter {
constructor(){
this._maxListeners = DEFAULT_MAX_LISTENERS