MCPcopy Create free account
hub / github.com/Project-DARC/DARC / serializeToString

Method serializeToString

darc-js/src/SDK/plugins/ConditionNode.ts:33–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 }
32
33 serializeToString(): string {
34 const childListString = this.childList.length == 0 ? this.childList.map((child) => child.serializeToString()).join(" ") : null;
35 let returnString = "";
36 if (this.type === ConditionNodeType.ExpressionNode) {
37 returnString+= `Expression: ${this.expression}(${this.expressionParameters})`;
38 }
39 else if (this.type === ConditionNodeType.LogicalOperatorNode) {
40 returnString+= `LogicalOperator: ${this.logicalOperator}`;
41 }
42 else if (this.type === ConditionNodeType.BooleanValueNode) {
43 returnString+= `BooleanValue: ${this.booleanValue}`;
44 }
45 if (childListString) {
46 returnString+= ` Child List: ${childListString}`;
47 }
48 return returnString;
49 }
50
51 // operator overloading for '&' operator
52 [Symbol.for('&')] (rightOperand: ConditionNode): ConditionNode {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected