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

Function readTaskMetaId

projects/openade-module/src/nodeYjsStorage.ts:90–98  ·  view source on GitHub ↗
(data: Uint8Array)

Source from the content-addressed store, hash-verified

88}
89
90function readTaskMetaId(data: Uint8Array): string | null {
91 const doc = applyYjsUpdate(data)
92 try {
93 const metaId = doc.getMap("task:meta").get("id")
94 return typeof metaId === "string" ? metaId : null
95 } finally {
96 doc.destroy()
97 }
98}
99
100function isExpectedTaskDoc(id: string, data: Uint8Array): boolean {
101 const expected = expectedTaskMetaId(id)

Callers 1

isExpectedTaskDocFunction · 0.70

Calls 3

destroyMethod · 0.80
applyYjsUpdateFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected