MCPcopy Index your code
hub / github.com/callstack/agent-device / redactDiagnosticData

Function redactDiagnosticData

src/kernel/redaction.ts:9–11  ·  view source on GitHub ↗
(input: T)

Source from the content-addressed store, hash-verified

7const URL_RE = /https?:\/\/[^\s"'<>]+/gi;
8
9export function redactDiagnosticData<T>(input: T): T {
10 return redactValue(input, new WeakSet<object>()) as T;
11}
12
13function redactValue(value: unknown, seen: WeakSet<object>, keyHint?: string): unknown {
14 if (value === null || value === undefined) return value;

Callers 3

emitDiagnosticFunction · 0.90
normalizeErrorFunction · 0.90

Calls 1

redactValueFunction · 0.70

Tested by

no test coverage detected