(record: RaycastRecord, keys: string[])
| 45 | } |
| 46 | |
| 47 | function readString(record: RaycastRecord, keys: string[]): string | null { |
| 48 | for (const key of keys) { |
| 49 | const value = record[key] |
| 50 | if (typeof value === 'string' && value.trim()) { |
| 51 | return value |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | return null |
| 56 | } |
| 57 | |
| 58 | function getFolderPath(record: RaycastRecord): string[] { |
| 59 | const folder = readString(record, ['folder', 'group', 'collection']) |
no outgoing calls
no test coverage detected