MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / stableStringify

Function stableStringify

src/core/structured-output-schema.ts:35–46  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

33}
34
35function stableStringify(value: unknown): string {
36 if (Array.isArray(value)) {
37 return `[${value.map(stableStringify).join(',')}]`;
38 }
39 if (isRecord(value)) {
40 const entries = Object.keys(value)
41 .sort()
42 .map((key) => `${JSON.stringify(key)}:${stableStringify(value[key])}`);
43 return `{${entries.join(',')}}`;
44 }
45 return JSON.stringify(value);
46}
47
48function assertSchemaRef(ref: StructuredOutputSchemaRef): void {
49 if (!SCHEMA_PATTERN.test(ref.schema)) {

Callers 1

mergeDefinitionFunction · 0.70

Calls 1

isRecordFunction · 0.70

Tested by

no test coverage detected