fix: preserve intentional OS name casing (macOS, iOS, webOS) #61

Merged
uz1mani merged 1 commits from staging into main 2026-03-19 10:34:16 +00:00

View File

@@ -30,6 +30,8 @@ type Tab = 'browsers' | 'os' | 'devices' | 'screens'
function capitalize(s: string): string {
if (!s) return s
// Preserve intentional casing (e.g. macOS, iOS, webOS, ChromeOS, FreeBSD)
if (s !== s.toLowerCase() && s !== s.toUpperCase()) return s
return s.charAt(0).toUpperCase() + s.slice(1)
}