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

Function toStringArray

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

Source from the content-addressed store, hash-verified

231}
232
233function toStringArray(value: ComputedConfigValue | undefined): string[] {
234 if (typeof value === "string") {
235 return [value];
236 }
237
238 if (Array.isArray(value)) {
239 const first = value[0];
240 if (typeof first === "string") {
241 return value as string[];
242 }
243 if (isParsedValueToken(first)) {
244 return [tokensToString(value as ParsedValueToken[])];
245 }
246 }
247
248 return [];
249}
250
251async function loadSSHConfig(): Promise<SSHConfig | null> {
252 const homeDir = getHomeDir();

Callers 1

resolveSSHConfigFunction · 0.85

Calls 2

isParsedValueTokenFunction · 0.85
tokensToStringFunction · 0.85

Tested by

no test coverage detected