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

Method toStringTokens

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

Source from the content-addressed store, hash-verified

3816 }
3817
3818 public override toStringTokens(): readonly StepStringToken[] {
3819 const { times, untilSteps, stepLabels, ...config } = this.config;
3820
3821 const tokens: StepStringToken[] = [
3822 { kind: "start" },
3823 { kind: "name", value: this.name },
3824 { kind: "config", value: config },
3825 {
3826 kind: "steps",
3827 value: this.steps.flatMap((step) => step.toStringTokens()),
3828 },
3829 ];
3830 if (stepLabels !== undefined && stepLabels.length > 0) {
3831 tokens.push({ kind: "aliases", value: stepLabels });
3832 }
3833 if (times !== undefined) {
3834 tokens.push({ kind: "keyword", value: "times" });
3835 tokens.push({ kind: "value", value: times });
3836 }
3837 if (untilSteps !== undefined) {
3838 tokens.push({ kind: "keyword", value: "until" });
3839 tokens.push({
3840 kind: "steps",
3841 value: untilSteps.flatMap((step) => step.toStringTokens()),
3842 });
3843 }
3844 if (this.traversed > 0) {
3845 tokens.push({ kind: "stat", key: "traversed", value: this.traversed });
3846 }
3847 if (this.emitted > 0) {
3848 tokens.push({ kind: "stat", key: "emitted", value: this.emitted });
3849 }
3850 tokens.push({ kind: "end" });
3851 return tokens;
3852 }
3853}
3854
3855export interface DedupStepConfig extends StepConfig {}

Callers

nothing calls this directly

Calls 2

toStringTokensMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected