(data: ProfilesData)
| 53 | } |
| 54 | |
| 55 | export function serializeProfilesData(data: ProfilesData): string { |
| 56 | const { [DEFAULT_PROFILE_NAME]: _default, ...userProfiles } = data.profiles; |
| 57 | void _default; |
| 58 | |
| 59 | return JSON.stringify({ |
| 60 | profiles: userProfiles, |
| 61 | activeProfile: normalizeActiveProfile(data.activeProfile, userProfiles), |
| 62 | }); |
| 63 | } |
| 64 | |
| 65 | export function loadProfilesData(storage: ProfilesStorageLike = localStorage): ProfilesData { |
| 66 | return parseProfilesDataJson(storage.getItem(STORAGE_KEYS.profiles)); |
no test coverage detected