mirror of https://github.com/lgc-4/DataTools3.git
22 lines
548 B
JavaScript
22 lines
548 B
JavaScript
class Concatinator extends Box {
|
|
constructor() {
|
|
super("Concatinator");
|
|
|
|
this.inputs.push(new Connector(Connector.INPUT, "any", ""));
|
|
this.inputs.push(new Connector(Connector.INPUT, "any", ""));
|
|
|
|
this.outputs.push(new Connector(Connector.OUTPUT, "string", ""));
|
|
|
|
for (let input of this.inputs) {
|
|
input.addListener((d) => {
|
|
let concatinated = "";
|
|
for (let input2 of this.inputs) {
|
|
concatinated = concatinated + input2.cache;
|
|
}
|
|
for (let output of this.outputs) {
|
|
output.send(concatinated);
|
|
}
|
|
})
|
|
}
|
|
}
|
|
} |