mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 21:44:55 +03:00
feat: replacing underscore with whitespace
This commit is contained in:
parent
fdefc0c165
commit
7905ef6c10
@ -51,9 +51,13 @@ export const removeSpecialEditionFromName = (name: string) =>
|
|||||||
export const removeDuplicateSpaces = (name: string) =>
|
export const removeDuplicateSpaces = (name: string) =>
|
||||||
name.replace(/\s{2,}/g, " ");
|
name.replace(/\s{2,}/g, " ");
|
||||||
|
|
||||||
|
export const replaceUnderscoreWithSpace = (name: string) =>
|
||||||
|
name.replace(/_/g, " ");
|
||||||
|
|
||||||
export const formatName = pipe<string>(
|
export const formatName = pipe<string>(
|
||||||
removeReleaseYearFromName,
|
removeReleaseYearFromName,
|
||||||
removeSpecialEditionFromName,
|
removeSpecialEditionFromName,
|
||||||
|
replaceUnderscoreWithSpace,
|
||||||
(str) => str.replace(/DIRECTOR'S CUT/g, ""),
|
(str) => str.replace(/DIRECTOR'S CUT/g, ""),
|
||||||
removeSymbolsFromName,
|
removeSymbolsFromName,
|
||||||
removeDuplicateSpaces,
|
removeDuplicateSpaces,
|
||||||
|
Loading…
Reference in New Issue
Block a user