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

Function parseFavoriteFolderKey

packages/app-core/src/lib/vault-layout.ts:557–564  ·  view source on GitHub ↗
(
  key: string
)

Source from the content-addressed store, hash-verified

555
556/** Parse a folder favorite key back into its `{ folder, subpath }` parts. */
557export function parseFavoriteFolderKey(
558 key: string
559): { folder: NoteFolder; subpath: string } | null {
560 const idx = key.indexOf(':')
561 if (idx === -1) return null
562 const folder = key.slice(0, idx) as NoteFolder
563 return { folder, subpath: key.slice(idx + 1) }
564}
565
566/** Toggle a favorite key, returning the next list (added at the end, or removed). */
567export function toggleFavorite(favorites: string[], key: string): string[] {

Callers 2

SidebarFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected