Skip to content

Helpers Submodule

'ua-parser-js/helpers'

List of Built-in Helpers:

Guess for the device vendor based on its model name

Check whether device has Apple Silicon Mac device properties.

Check whether user-agent is an AI bot

Check whether user-agent is a bot

Check whether browser is a Chrome-based browser (using Blink engine)

Check whether current window is running inside Electron

Check whether current browser timezone is from an EU country

Check whether user-agent string match with reduced/frozen user-agent pattern

Check whether current PWA window is running in a standalone mode (not in browser)

Code Example

js
import { isFrozenUA } from 'ua-parser-js/helpers';

const regularMobileUA = "Mozilla/5.0 (Linux; Android 9; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.1234.56 Mobile Safari/537.36";
const freezedMobileUA = "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.0.0 Mobile Safari/537.36";

console.log(isFrozenUA(regularMobileUA));
// false

console.log(isFrozenUA(freezedMobileUA));
// true

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