MCPcopy Create free account
hub / github.com/andywer/threads.js / serialize

Function serialize

test/lib/serialization.ts:32–41  ·  view source on GitHub ↗
(data, fallback)

Source from the content-addressed store, hash-verified

30 },
31
32 serialize(data, fallback) {
33 if (data instanceof Foo) {
34 return {
35 __type: "$$foo",
36 val: data.getValue()
37 }
38 } else {
39 return fallback(data)
40 }
41 }
42}

Callers

nothing calls this directly

Calls 1

getValueMethod · 0.80

Tested by

no test coverage detected