nit
This commit is contained in:
parent
106c8cef01
commit
8d2270e4ac
|
|
@ -206,7 +206,8 @@ export function addSuffixToFilePath(filePath: string, suffix: string): string {
|
||||||
return base + suffix + ext;
|
return base + suffix + ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sanitizeFilePathBeforeExtension(filePath: string, ext = path.extname(filePath)): string {
|
export function sanitizeFilePathBeforeExtension(filePath: string, ext?: string): string {
|
||||||
|
ext ??= path.extname(filePath);
|
||||||
const base = filePath.substring(0, filePath.length - ext.length);
|
const base = filePath.substring(0, filePath.length - ext.length);
|
||||||
return sanitizeForFilePath(base) + ext;
|
return sanitizeForFilePath(base) + ext;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue