MCPcopy Create free account
hub / github.com/editablejs/editable / getContent

Function getContent

packages/yjs-websocket/src/server/callback.ts:60–77  ·  view source on GitHub ↗
(
  objName: string,
  objType: ContentType,
  doc: WSSharedDoc,
)

Source from the content-addressed store, hash-verified

58}
59
60const getContent = (
61 objName: string,
62 objType: ContentType,
63 doc: WSSharedDoc,
64): AbstractType<any> | null => {
65 switch (objType) {
66 case 'Array':
67 return doc.getArray(objName)
68 case 'Map':
69 return doc.getMap(objName)
70 case 'Text':
71 return doc.getText(objName)
72 case 'XmlFragment':
73 return doc.getXmlFragment(objName)
74 default:
75 return null
76 }
77}
78
79export { callbackHandler }

Callers 1

callbackHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…