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

Function parseProfilesDataJson

src/hooks/profilesStorage.ts:45–53  ·  view source on GitHub ↗
(stored: string | null)

Source from the content-addressed store, hash-verified

43}
44
45export function parseProfilesDataJson(stored: string | null): ProfilesData {
46 if (!stored) return DEFAULT_PROFILES_DATA;
47
48 try {
49 return normalizeProfilesData(JSON.parse(stored));
50 } catch {
51 return DEFAULT_PROFILES_DATA;
52 }
53}
54
55export function serializeProfilesData(data: ProfilesData): string {
56 const { [DEFAULT_PROFILE_NAME]: _default, ...userProfiles } = data.profiles;

Callers 2

loadProfilesDataFunction · 0.85

Calls 1

normalizeProfilesDataFunction · 0.85

Tested by

no test coverage detected