MCPcopy Index your code
hub / github.com/coder/mux / toStringValue

Function toStringValue

src/node/runtime/sshConfigParser.ts:101–117  ·  view source on GitHub ↗
(value: ComputedConfigValue | undefined)

Source from the content-addressed store, hash-verified

99}
100
101function toStringValue(value: ComputedConfigValue | undefined): string | undefined {
102 if (typeof value === "string") {
103 return value;
104 }
105
106 if (Array.isArray(value)) {
107 const first = value[0];
108 if (typeof first === "string") {
109 return first;
110 }
111 if (isParsedValueToken(first)) {
112 return tokensToString(value as ParsedValueToken[]);
113 }
114 }
115
116 return undefined;
117}
118
119type MatchCriteriaValue = string | Array<{ val: string; separator: string; quoted?: boolean }>;
120

Callers 1

resolveSSHConfigFunction · 0.85

Calls 2

isParsedValueTokenFunction · 0.85
tokensToStringFunction · 0.85

Tested by

no test coverage detected