MCPcopy Create free account
hub / github.com/codemix/graph / toStringTokens

Method toStringTokens

packages/graph/src/Steps.ts:5365–5389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5363 }
5364
5365 public override toStringTokens(): readonly StepStringToken[] {
5366 const { targetId, targetCondition, stepLabels, ...config } = this.config;
5367
5368 const tokens: StepStringToken[] = [
5369 { kind: "start" },
5370 { kind: "name", value: this.name },
5371 { kind: "config", value: { targetId, ...config } },
5372 ];
5373
5374 if (targetCondition !== undefined) {
5375 tokens.push({ kind: "condition", value: targetCondition });
5376 }
5377
5378 if (stepLabels !== undefined && stepLabels.length > 0) {
5379 tokens.push({ kind: "aliases", value: stepLabels });
5380 }
5381 if (this.traversed > 0) {
5382 tokens.push({ kind: "stat", key: "traversed", value: this.traversed });
5383 }
5384 if (this.emitted > 0) {
5385 tokens.push({ kind: "stat", key: "emitted", value: this.emitted });
5386 }
5387 tokens.push({ kind: "end" });
5388 return tokens;
5389 }
5390}
5391
5392// Export the evaluateCondition function for use by ShortestPathStep

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected