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

Function toStringTokens

packages/graph/src/Steps.ts:395–414  ·  view source on GitHub ↗

* Convert the step to an array of string tokens.

()

Source from the content-addressed store, hash-verified

393 * Convert the step to an array of string tokens.
394 */
395 public toStringTokens(): readonly StepStringToken[] {
396 const { stepLabels, ...config } = this.config;
397
398 const tokens: StepStringToken[] = [
399 { kind: "start" },
400 { kind: "name", value: this.name },
401 { kind: "config", value: config },
402 ];
403 if (stepLabels !== undefined && stepLabels.length > 0) {
404 tokens.push({ kind: "aliases", value: stepLabels });
405 }
406 if (this.traversed > 0) {
407 tokens.push({ kind: "stat", key: "traversed", value: this.traversed });
408 }
409 if (this.emitted > 0) {
410 tokens.push({ kind: "stat", key: "emitted", value: this.emitted });
411 }
412 tokens.push({ kind: "end" });
413 return tokens;
414 }
415
416 public toString() {
417 return stringTokensToString(this.toStringTokens());

Callers

nothing calls this directly

Calls 2

pushMethod · 0.45
toStringTokensMethod · 0.45

Tested by

no test coverage detected