Merge pull request #61 from ciphera-net/staging
fix: preserve intentional OS name casing (macOS, iOS, webOS)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user