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

Function removeFolderColors

apps/desktop/src/main/vault.ts:1055–1068  ·  view source on GitHub ↗
(
  folderColors: Record<string, FolderColorId>,
  folder: NoteFolder,
  subpath: string
)

Source from the content-addressed store, hash-verified

1053}
1054
1055function removeFolderColors(
1056 folderColors: Record<string, FolderColorId>,
1057 folder: NoteFolder,
1058 subpath: string
1059): Record<string, FolderColorId> {
1060 const next: Record<string, FolderColorId> = {}
1061 const exactKey = folderIconKey(folder, subpath)
1062 const prefix = `${exactKey}/`
1063 for (const [key, value] of Object.entries(folderColors)) {
1064 if (key === exactKey || key.startsWith(prefix)) continue
1065 next[key] = value
1066 }
1067 return next
1068}
1069
1070function duplicateFolderIcons(
1071 folderIcons: Record<string, FolderIconId>,

Callers 1

deleteFolderFunction · 0.70

Calls 1

folderIconKeyFunction · 0.70

Tested by

no test coverage detected