Skip to content

Instantly share code, notes, and snippets.

@dgzlopes
Created September 16, 2023 16:01
Show Gist options
  • Save dgzlopes/cd96b375b8ede1d46596be06e48961a8 to your computer and use it in GitHub Desktop.
Save dgzlopes/cd96b375b8ede1d46596be06e48961a8 to your computer and use it in GitHub Desktop.
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