UAParser : getCPU()
getCPU(): ICPU
Returns the CPU architecture name.
ICPU
Properties
js
{
architecture: ""
}architecture?: string
The detected CPU architecture (e.g. arm, amd64, ppc, x86).
INFO
See list of possible CPU architectures here.
Methods
Inherited from IData:
is(value: string): booleantoString(): stringwithClientHints<ICPU>(): PromiseLike<ICPU> | ICPUwithFeatureCheck<ICPU>(): PromiseLike<ICPU> | ICPU
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" }