damn you kyza

This commit is contained in:
amy 2025-03-12 16:07:39 +03:30
parent 5c8b8d0104
commit e18bebd0a5
No known key found for this signature in database
2 changed files with 31 additions and 2 deletions

View file

@ -56,3 +56,32 @@ export function getSongOnPreferredProvider(json: any, link: string): Song | null
}
return null
}
export function kyzaify(input: string): string {
//im gonna write this as shittily as possible just because.
if (input === "youtube") {
return "YouTube";
} else if (input === "youtubeMusic") {
return "YouTube Music";
} else if (input === "itunes") {
return "iTunes";
} else if (input === "soundcloud") {
return "SoundCloud";
}
if (input.length === 0) return input;
let result = input.charAt(0).toUpperCase();
for (let i = 1; i < input.length; i++) {
const char = input.charAt(i);
if (char === char.toUpperCase()) {
result += ' ' + char;
} else {
result += char;
}
}
return result;
}