feat: replacing underscore with whitespace

This commit is contained in:
Chubby Granny Chaser
2024-07-05 15:53:32 +01:00
parent fdefc0c165
commit 7905ef6c10

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,