MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / serialize

Method serialize

packages/repository/src/types/object.ts:46–52  ·  view source on GitHub ↗
(value: T | null | undefined)

Source from the content-addressed store, hash-verified

44 }
45
46 serialize(value: T | null | undefined) {
47 if (value == null) return value;
48 if (typeof value.toJSON === 'function') {
49 return value.toJSON();
50 }
51 return value;
52 }
53}

Callers

nothing calls this directly

Calls 1

toJSONMethod · 0.45

Tested by

no test coverage detected