MCPcopy Index your code
hub / github.com/CommandCodeAI/BaseAI / redactSensitiveData

Function redactSensitiveData

packages/baseai/src/dev/utils/dlog.ts:39–42  ·  view source on GitHub ↗
(value: unknown, isSensitive: boolean)

Source from the content-addressed store, hash-verified

37 SENSITIVE_WORDS.some(word => key.toLowerCase().includes(word));
38
39const redactSensitiveData = (value: unknown, isSensitive: boolean): string =>
40 isSensitive && !LOG_SENSITIVE_DATA
41 ? chalk.red('======REDACTED======')
42 : formatValue(value);
43
44const logKeyValue = (key: string, value: unknown, sensitive?: string): void => {
45 const formattedValue = redactSensitiveData(

Callers 1

logKeyValueFunction · 0.85

Calls 1

formatValueFunction · 0.85

Tested by

no test coverage detected