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

Function removeFolderIcons

packages/app-core/src/lib/vault-layout.ts:661–674  ·  view source on GitHub ↗
(
  folderIcons: Record<string, FolderIconId>,
  folder: NoteFolder,
  subpath: string
)

Source from the content-addressed store, hash-verified

659}
660
661export function removeFolderIcons(
662 folderIcons: Record<string, FolderIconId>,
663 folder: NoteFolder,
664 subpath: string
665): Record<string, FolderIconId> {
666 const next: Record<string, FolderIconId> = {}
667 const exactKey = folderIconKey(folder, subpath)
668 const prefix = `${exactKey}/`
669 for (const [key, value] of Object.entries(folderIcons)) {
670 if (key === exactKey || key.startsWith(prefix)) continue
671 next[key] = value
672 }
673 return next
674}
675
676export function duplicateFolderIcons(
677 folderIcons: Record<string, FolderIconId>,

Callers 1

store.tsFile · 0.90

Calls 1

folderIconKeyFunction · 0.70

Tested by

no test coverage detected