Merge pull request #783 from hydralauncher/fix/replacing-underscore-with-whitespace

feat: replacing underscore with whitespace
This commit is contained in:
Chubby Granny Chaser 2024-07-05 16:04:49 +01:00 committed by GitHub
commit 64f4dad7cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,9 +51,13 @@ export const removeSpecialEditionFromName = (name: string) =>
export const removeDuplicateSpaces = (name: string) =>
name.replace(/\s{2,}/g, " ");
export const replaceUnderscoreWithSpace = (name: string) =>
name.replace(/_/g, " ");
export const formatName = pipe<string>(
removeReleaseYearFromName,
removeSpecialEditionFromName,
replaceUnderscoreWithSpace,
(str) => str.replace(/DIRECTOR'S CUT/g, ""),
removeSymbolsFromName,
removeDuplicateSpaces,