Function: sanitizeFileExtension()
function sanitizeFileExtension(extension: string, fallback?: string): string;
Defined in: utils/files/sanitizeFilename.ts:89
Normalises file extensions by removing leading dots/whitespace and characters that are not alphanumeric, dashes or underscores. Extensions are lower-cased for consistency.
Parametersβ
extensionβ
string
fallback?β
string = ""
Returnsβ
string