( value: unknown, paths: PathSegment[][], )
| 79 | } |
| 80 | |
| 81 | function getFirstBoolean( |
| 82 | value: unknown, |
| 83 | paths: PathSegment[][], |
| 84 | ): boolean | null { |
| 85 | for (const path of paths) { |
| 86 | const candidate = getNested(value, path) |
| 87 | if (typeof candidate === 'boolean') { |
| 88 | return candidate |
| 89 | } |
| 90 | } |
| 91 | return null |
| 92 | } |
| 93 | |
| 94 | function asArray(value: unknown): unknown[] { |
| 95 | return Array.isArray(value) ? value : [] |
no test coverage detected