(clientId?: string)
| 129 | const cache = new Map<string, ParsedRules | null>() |
| 130 | |
| 131 | function parsedFor(clientId?: string): ParsedRules | null { |
| 132 | const key = clientId ?? NO_CLIENT |
| 133 | if (cache.has(key)) return cache.get(key)! |
| 134 | const clientConfig = getClientRedactionConfig(server, clientId) |
| 135 | const rules = resolveEffectiveRules(serverRedactionConfig, clientConfig) |
| 136 | const parsed = rules ? parseRules(rules) : null |
| 137 | cache.set(key, parsed) |
| 138 | return parsed |
| 139 | } |
| 140 | |
| 141 | return { |
| 142 | redact(data, clientId) { |
no test coverage detected