(activeProfile: unknown, profiles: ProfilesData['profiles'])
| 16 | } |
| 17 | |
| 18 | function normalizeActiveProfile(activeProfile: unknown, profiles: ProfilesData['profiles']): string | null { |
| 19 | if (typeof activeProfile !== 'string') return null; |
| 20 | if (activeProfile === DEFAULT_PROFILE_NAME || activeProfile in profiles) return activeProfile; |
| 21 | return null; |
| 22 | } |
| 23 | |
| 24 | export function normalizeProfilesData(value: unknown): ProfilesData { |
| 25 | if (!isRecord(value) || !isRecord(value.profiles)) { |
no outgoing calls
no test coverage detected