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

Function formatValue

packages/baseai/src/dev/utils/dlog.ts:20–34  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

18];
19
20const formatValue = (value: unknown): string => {
21 if (typeof value === 'object' && value !== null) {
22 return util.inspect(value, { colors: true, depth: null });
23 }
24 if (typeof value === 'string') {
25 return chalk.green(`"${value}"`);
26 }
27 if (typeof value === 'number') {
28 return chalk.yellow(value.toString());
29 }
30 if (typeof value === 'boolean') {
31 return chalk.cyan(value.toString());
32 }
33 return String(value);
34};
35
36const isSensitiveData = (key: string): boolean =>
37 SENSITIVE_WORDS.some(word => key.toLowerCase().includes(word));

Callers 1

redactSensitiveDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected