MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / redactFilePaths

Function redactFilePaths

packages/core/src/telemetryRedaction.ts:12–19  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

10}
11
12function redactFilePaths(value: string): string {
13 return value
14 .replace(/file:\/\/[^\s'")]+/g, "[file-url]")
15 .replace(/\/Users\/[^\s'")]+/g, "[path]")
16 .replace(/\/(?:home|root|opt|app|workspace|srv|mnt)\/[^\s'")]+/g, "[path]")
17 .replace(/\/(?:private\/)?(?:var|tmp)\/[^\s'")]+/g, "[path]")
18 .replace(/[A-Za-z]:\\[^\s'")]+/g, "[path]");
19}
20
21export function redactTelemetryString(
22 value: string,

Callers 1

redactTelemetryStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected