Apply to all capitalization

This commit is contained in:
Nicolas Mowen 2024-11-05 08:18:37 -07:00
parent 6ccde086e6
commit b1bec351b1
2 changed files with 2 additions and 3 deletions

View File

@ -276,9 +276,7 @@ export default function LivePlayer({
]), ]),
] ]
.filter((label) => label?.includes("-verified") == false) .filter((label) => label?.includes("-verified") == false)
.map((label) => .map((label) => capitalizeFirstLetter(label))
capitalizeFirstLetter(label.replaceAll("_", " ")),
)
.sort() .sort()
.join(", ") .join(", ")
.replaceAll("-verified", "")} .replaceAll("-verified", "")}

View File

@ -4,6 +4,7 @@ export const capitalizeFirstLetter = (text: string): string => {
export const capitalizeAll = (text: string): string => { export const capitalizeAll = (text: string): string => {
return text return text
.replaceAll("_", " ")
.split(" ") .split(" ")
.map((word) => word.charAt(0).toUpperCase() + word.slice(1)) .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(" "); .join(" ");