MCPcopy
hub / github.com/freshframework/fresh / stringify

Function stringify

packages/fresh/src/jsonify/stringify.ts:46–54  ·  view source on GitHub ↗
(data: unknown, custom?: Stringifiers)

Source from the content-addressed store, hash-verified

44 * serialized only once.
45 */
46export function stringify(data: unknown, custom?: Stringifiers): string {
47 const out: string[] = [];
48 const indexes = new Map<unknown, number>();
49 const res = serializeInner(out, indexes, data, custom);
50 if (res < 0) {
51 return String(res);
52 }
53 return `[${out.join(",")}]`;
54}
55
56function serializeInner(
57 out: string[],

Callers 4

stringify_test.tsFile · 0.90
round_trip_test.tsFile · 0.90
custom_test.tsFile · 0.90
FreshRuntimeScriptFunction · 0.90

Calls 1

serializeInnerFunction · 0.85

Tested by

no test coverage detected