Skip to content

UAParser : getOS()

getOS(): IOS

Returns the operating system name and version.

IOS

Properties

js
{ 
    name: "", 
    version: ""
}

name?: string

The name of detected operating system.

INFO

See list of possible os name here.


version?: string

The detected OS version, determined dynamically from the user-agent string.

Methods

Inherited from IData:

Code Example

js

const galaxytabs8 = 'Mozilla/5.0 (Linux; Android 12; SM-X706B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36'
const parser = new UAParser(galaxytabs8);

console.log(parser.getOS());
// { name : "Android", version : "12" }

UAParser.js v2 is licensed under AGPLv3 or PRO licenses.