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

Function redactChunk

src/daemon/app-log-stream.ts:15–22  ·  view source on GitHub ↗
(chunk: string, patterns: RegExp[])

Source from the content-addressed store, hash-verified

13}
14
15function redactChunk(chunk: string, patterns: RegExp[]): string {
16 if (patterns.length === 0) return chunk;
17 let output = chunk;
18 for (const pattern of patterns) {
19 output = output.replace(pattern, '[REDACTED]');
20 }
21 return output;
22}
23
24type LineWriter = { onChunk: (chunk: string) => void; flush: () => void };
25

Callers 1

writeLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected