(root: unknown, paths: string[])
| 1016 | } |
| 1017 | |
| 1018 | function extractFirstString(root: unknown, paths: string[]): string | null { |
| 1019 | for (const p of paths) { |
| 1020 | const value = getPathValue(root, p); |
| 1021 | if (typeof value !== 'string') continue; |
| 1022 | const trimmed = value.trim(); |
| 1023 | if (trimmed) return trimmed; |
| 1024 | } |
| 1025 | return null; |
| 1026 | } |
| 1027 | |
| 1028 | function extractStringArray(root: unknown, paths: string[]): string[] { |
| 1029 | for (const p of paths) { |
no test coverage detected