Created
September 16, 2023 16:01
-
-
Save dgzlopes/cd96b375b8ede1d46596be06e48961a8 to your computer and use it in GitHub Desktop.
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
export class Stack { | |
constructor(name, config) { | |
this.name = name; | |
this.config = config; | |
if (_isParse === true) { | |
parseOutput.stacks[this.name] = []; | |
parseOutput.stacks[this.name].push(this); | |
} | |
} | |
push (value) { | |
if (runOutput.eventsPerStack[this.name] === undefined) { | |
runOutput.eventsPerStack[this.name] = []; | |
} | |
runOutput.eventsPerStack[this.name].push(value); | |
} | |
} | |
export var events = { | |
on (source, callback) { | |
if (_isParse === true) { | |
return | |
} | |
const e = _event; | |
if (e._source === source) { | |
callback(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment