MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / serializeProfilesData

Function serializeProfilesData

src/hooks/profilesStorage.ts:55–63  ·  view source on GitHub ↗
(data: ProfilesData)

Source from the content-addressed store, hash-verified

53}
54
55export 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
65export function loadProfilesData(storage: ProfilesStorageLike = localStorage): ProfilesData {
66 return parseProfilesDataJson(storage.getItem(STORAGE_KEYS.profiles));

Callers 2

saveProfilesDataFunction · 0.85

Calls 1

normalizeActiveProfileFunction · 0.85

Tested by

no test coverage detected