We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is how I get OS from User Agent. I request author to use this code to improve OS parser for better & accurate result.
List Order is very important for accurate result
const osList: any = { 'windows nt 10': 'Windows 10', 'windows nt 6.3': 'Windows 8.1', 'windows nt 6.2': 'Windows 8', 'windows nt 6.1': 'Windows 7', 'windows nt 6.0': 'Windows Vista', 'windows nt 5.2': 'Windows Server 2003/XP x64', 'windows nt 5.1': 'Windows XP', 'windows xp': 'Windows XP', 'windows nt 5.0': 'Windows 2000', 'windows me': 'Windows ME', win98: 'Windows 98', win95: 'Windows 95', win16: 'Windows 3.11', mac_powerpc: 'Mac OS 9', 'macintosh|mac os x': 'Mac OS X', 'Red Hat': 'Red Hat', ubuntu: 'Ubuntu', fedora: 'Fedora', android: 'Android', linux: 'Linux', iphone: 'iPhone', ipod: 'iPod', ipad: 'iPad', blackberry: 'BlackBerry', 'webos|wos': 'Mobile', }; let theOs: string = 'Other'; for (const os in osList) { if (agent.match(new RegExp(os, 'gmi'))) { theOs = osList[os]; break; } } return theOs; };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is how I get OS from User Agent.
I request author to use this code to improve OS parser for better & accurate result.
List Order is very important for accurate result
The text was updated successfully, but these errors were encountered: