frohzinn's picture
download
raw
416 Bytes
/**
* Redacts a sensitive value, optionally showing the last N characters.
*
* @param value - The value to redact
* @param showLastChars - If provided, reveals the last N characters with a leading mask
* @returns The redacted string
*/
export function redactValue(value: string, showLastChars?: number): string {
if (showLastChars) {
return `....${value.slice(-showLastChars)}`;
}
return '[redacted]';
}

Xet Storage Details

Size:
416 Bytes
·
Xet hash:
ba2e5f6e492c20f8601392e55b287e8b696389dbb9eb6ebff81c40bb34b19a66

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.