MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / variableFor

Function variableFor

packages/core/sdk/src/migration-spec.ts:498–506  ·  view source on GitHub ↗
(placement: Placement)

Source from the content-addressed store, hash-verified

496 // connection carries one value per key.
497 const taken = new Set<string>();
498 const variableFor = (placement: Placement): string => {
499 if (placements.length <= 1) return PRIMARY_INPUT_VARIABLE;
500 const base = slugifyVariable(placement.name) || "input";
501 let candidate = base;
502 let n = 2;
503 while (taken.has(candidate)) candidate = `${base}_${n++}`;
504 taken.add(candidate);
505 return candidate;
506 };
507
508 const apiKeyHeaders: Record<string, readonly TemplatePart[]> = {};
509 const apiKeyQueryParams: Record<string, readonly TemplatePart[]> = {};

Callers 1

Calls 1

slugifyVariableFunction · 0.70

Tested by

no test coverage detected