Skip to content

redactSettings

Copies settings, replacing the value of every key in secretKeys, at any depth and compared without case, with REDACTED_VALUE. The original is not changed.

Import:

import { redactSettings } from '@mnaoumov/obsidian-lib/bug-report-diagnostics';

Signature:

function redactSettings(settings: unknown, secretKeys: readonly string[]): unknown

Parameters:

Parameter Type Description
settings unknown The settings.
secretKeys readonly string[] The keys to redact.

Returns: unknown — The redacted copy.