Skip to content

Device-Detection Submodule

Import from 'ua-parser-js/device-detection'

List of Built-in Methods:

Guess for the device vendor based on its model name

Check whether device has Apple Silicon Mac device properties.

Code Example

js
import { getDeviceVendor } from 'ua-parser-js/device-detection';

console.log(getDeviceVendor('SM-A605G'));       // Samsung
console.log(getDeviceVendor('Redmi Note 8'));   // Xiaomi
console.log(getDeviceVendor('Nexus 6P'));       // Huawei
console.log(getDeviceVendor('Quest 3'));        // Facebook
console.log(getDeviceVendor('AQUOS-TVX19B'));   // Sharp

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