Skip to content

getCPU(): ICPU

Get type of CPU architecture from user-agent string.

Properties of ICPU

js
// CPU object is structured as follow:
{ 
    architecture: ""
}

architecture?: string

INFO

See list of possible cpu architecture here.

Methods of ICPU

Inherited from IData:

Code Example

js
const powerpc = 'Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC Mac OS; en)'
const parser = new UAParser(powerpc);

console.log(parser.getCPU());
// { architecture : "ppc" }

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