MCPcopy
hub / github.com/yjs/yjs / ytypeToJSON

Function ytypeToJSON

tests/compatibility.tests.js:18–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 * @param {Y.Type} ytype
17 */
18const ytypeToJSON = ytype => ytype.toJSON()?.children?.map(x => s.$objectAny.check(x) ? (x.attrs || x.children) : x)
19
20/**
21 * @param {t.TestCase} _tc

Callers 1

testArrayCompatibilityV1Function · 0.85

Calls 2

mapMethod · 0.80
toJSONMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…