MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / scrubJson

Function scrubJson

scripts/migration/service-split-postgres-cli.ts:211–221  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

209};
210
211const scrubJson = (value: unknown): unknown => {
212 if (Array.isArray(value)) return value.map(scrubJson);
213 if (value && typeof value === "object") {
214 return Object.fromEntries(
215 Object.entries(value)
216 .filter(([, inner]) => inner !== undefined)
217 .map(([key, inner]) => [key, scrubJson(inner)]),
218 );
219 }
220 return value;
221};
222
223const stableId = (...parts: readonly string[]): string => {
224 const text = parts.join("\u0000");

Callers 1

applyOrgFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected