(data: TransformData, keyPattern: KeyRule)
| 283 | } |
| 284 | |
| 285 | function findMatchingKeys(data: TransformData, keyPattern: KeyRule): string[] { |
| 286 | const matched: string[] = []; |
| 287 | for (const key of Object.keys(data)) { |
| 288 | if (matchesRule(key, keyPattern)) { |
| 289 | matched.push(key); |
| 290 | } |
| 291 | } |
| 292 | return matched; |
| 293 | } |
| 294 | |
| 295 | function matchesRule(candidate: string, rule: KeyRule): boolean { |
| 296 | candidate = candidate.toLowerCase(); |
no test coverage detected