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

Function dbPagesToRelative

apps/web/src/bridge/http-bridge.ts:702–709  ·  view source on GitHub ↗
(csvRel: string, pages: Record<string, string>)

Source from the content-addressed store, hash-verified

700 )
701}
702function dbPagesToRelative(csvRel: string, pages: Record<string, string>): Record<string, string> {
703 const formDir = formDirFromCsvPath(dbToPosix(csvRel))
704 if (!formDir) return pages
705 const prefix = `${formDir}/`
706 return Object.fromEntries(
707 Object.entries(pages).map(([id, p]) => [id, p.startsWith(prefix) ? p.slice(prefix.length) : p])
708 )
709}
710
711function dbHydrate(
712 csvPath: string,

Callers 1

dbPersistSidecarFunction · 0.85

Calls 2

formDirFromCsvPathFunction · 0.90
dbToPosixFunction · 0.85

Tested by

no test coverage detected