MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / unsanitizeId

Function unsanitizeId

projects/openade-module/src/nodeYjsStorage.ts:33–41  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

31}
32
33function unsanitizeId(filename: string): string {
34 if (filename === "code_repos") return "code:repos"
35 if (filename === "code_personal_settings") return "code:personal_settings"
36 if (filename === "code_mcp_servers") return "code:mcp_servers"
37 if (filename.startsWith("code_task_")) return `code:task:${filename.slice("code_task_".length)}`
38 if (filename.startsWith("code_scratchpad-index_")) return `code:scratchpad-index:${filename.slice("code_scratchpad-index_".length)}`
39 if (filename.startsWith("code_scratchpad_")) return `code:scratchpad:${filename.slice("code_scratchpad_".length)}`
40 return filename.replace(/_/g, ":")
41}
42
43function isRecord(value: unknown): value is Record<string, unknown> {
44 return typeof value === "object" && value !== null && !Array.isArray(value)

Callers 1

listDocumentsFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected