( criteria: Record<string, MatchCriteriaValue>, key: string )
| 119 | type MatchCriteriaValue = string | Array<{ val: string; separator: string; quoted?: boolean }>; |
| 120 | |
| 121 | function 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 | |
| 131 | function criteriaToString(value: MatchCriteriaValue | undefined): string | undefined { |
| 132 | if (typeof value === "string") { |
no outgoing calls
no test coverage detected