MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / normalizeFolderColors

Function normalizeFolderColors

apps/desktop/src/main/vault.ts:177–186  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

175}
176
177function normalizeFolderColors(value: unknown): Record<string, FolderColorId> {
178 const out: Record<string, FolderColorId> = {}
179 if (value && typeof value === 'object') {
180 for (const [key, colorId] of Object.entries(value as Record<string, unknown>)) {
181 if (!key || !isFolderColorId(colorId)) continue
182 out[key] = colorId
183 }
184 }
185 return out
186}
187
188const DEFAULT_VAULT_SETTINGS: VaultSettings = {
189 primaryNotesLocation: 'inbox',

Callers 1

normalizeVaultSettingsFunction · 0.85

Calls 1

isFolderColorIdFunction · 0.70

Tested by

no test coverage detected