MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / recursiveSerialize

Function recursiveSerialize

test/jest-config.ts:133–142  ·  view source on GitHub ↗
(x: unknown)

Source from the content-addressed store, hash-verified

131}
132
133function recursiveSerialize(x: unknown): string {
134 if (x === null) return 'null';
135 if (
136 typeof x === 'object' &&
137 !Array.isArray(x) &&
138 x.constructor.name !== 'Object'
139 )
140 return `{${x.constructor.name}}`;
141 return serialize(x);
142}
143
144function serialize(x: any): string {
145 if (Array.isArray(x)) {

Callers 1

serializeFunction · 0.85

Calls 1

serializeFunction · 0.70

Tested by

no test coverage detected