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

Function criteriaToStringArray

src/node/runtime/sshConfigParser.ts:143–153  ·  view source on GitHub ↗
(value: MatchCriteriaValue | undefined)

Source from the content-addressed store, hash-verified

141}
142
143function criteriaToStringArray(value: MatchCriteriaValue | undefined): string[] {
144 if (typeof value === "string") {
145 return [value];
146 }
147
148 if (Array.isArray(value)) {
149 return value.map(({ val }) => val);
150 }
151
152 return [];
153}
154
155function expandMatchExecTokens(command: string, hostName: string, user?: string): string {
156 return command.replace(/%(%|h|r)/g, (_match, token) => {

Callers 1

applyNegatedExecMatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected