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

Function getCriteriaValue

src/node/runtime/sshConfigParser.ts:121–129  ·  view source on GitHub ↗
(
  criteria: Record<string, MatchCriteriaValue>,
  key: string
)

Source from the content-addressed store, hash-verified

119type MatchCriteriaValue = string | Array<{ val: string; separator: string; quoted?: boolean }>;
120
121function getCriteriaValue(
122 criteria: Record<string, MatchCriteriaValue>,
123 key: string
124): MatchCriteriaValue | undefined {
125 const match = Object.entries(criteria).find(
126 ([criteriaKey]) => criteriaKey.toLowerCase() === key.toLowerCase()
127 );
128 return match?.[1];
129}
130
131function criteriaToString(value: MatchCriteriaValue | undefined): string | undefined {
132 if (typeof value === "string") {

Callers 1

applyNegatedExecMatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected