Function: sanitizeFilenameComponent()
function sanitizeFilenameComponent(value: string, fallback?: string): string;
Defined in: utils/files/sanitizeFilename.ts:120
Safely transforms an arbitrary string into a file-system friendly segment. Reserved Windows characters, ASCII control codes (0x00-0x1F), trailing dots and leading periods are stripped. Whitespace collapses to single underscores.
Parametersβ
valueβ
string
fallback?β
string = DEFAULT_FALLBACK_BASE
Returnsβ
string