MCPcopy Index your code
hub / github.com/github/copilot-sdk / stableStringify

Function stableStringify

scripts/codegen/utils.ts:490–501  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

488}
489
490export function stableStringify(value: unknown): string {
491 if (Array.isArray(value)) {
492 return `[${value.map((item) => stableStringify(item)).join(",")}]`;
493 }
494
495 if (value && typeof value === "object") {
496 const entries = Object.entries(value as Record<string, unknown>).sort(([a], [b]) => a.localeCompare(b));
497 return `{${entries.map(([key, entryValue]) => `${JSON.stringify(key)}:${stableStringify(entryValue)}`).join(",")}}`;
498 }
499
500 return JSON.stringify(value) ?? "undefined";
501}
502
503export interface ApiSchema {
504 definitions?: Record<string, JSONSchema7Definition>;

Callers 4

refTypeNameFunction · 0.70

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…