Socket
Socket
Sign inDemoInstall

ua-parser-js

Package Overview
Dependencies
0
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ua-parser-js

Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client Hints data. Supports browser & node.js environment


Version published
Weekly downloads
12M
increased by1.28%
Maintainers
1
Install size
267 kB
Created
Weekly downloads
 

Package description

What is ua-parser-js?

The ua-parser-js package is a utility for parsing user agent strings. It can be used to extract detailed information about the browser, engine, OS, CPU, and device from the user agent string provided by the client's browser.

What are ua-parser-js's main functionalities?

Browser Detection

This feature allows you to detect the browser name and version from the user agent string.

const UAParser = require('ua-parser-js');
const parser = new UAParser();
const browser = parser.getBrowser();
console.log(browser);

Operating System Detection

This feature enables you to determine the operating system and its version from the user agent string.

const UAParser = require('ua-parser-js');
const parser = new UAParser();
const os = parser.getOS();
console.log(os);

Device Detection

With this feature, you can identify the device type, vendor, and model from the user agent string.

const UAParser = require('ua-parser-js');
const parser = new UAParser();
const device = parser.getDevice();
console.log(device);

Engine Detection

This feature allows you to extract the layout engine name and version from the user agent string.

const UAParser = require('ua-parser-js');
const parser = new UAParser();
const engine = parser.getEngine();
console.log(engine);

CPU Architecture Detection

This feature provides information about the CPU architecture from the user agent string.

const UAParser = require('ua-parser-js');
const parser = new UAParser();
const cpu = parser.getCPU();
console.log(cpu);

Other packages similar to ua-parser-js

Changelog

Source

Version 2.0.0-beta.3

  • Breaking:
    • AR/VR devices moved to new device type: xr
    • New property in browser: type
  • New features:
    • Parse directly from command line using npx ua-parser-js
    • Extensions can be passed as a list to UAParser()
  • Add new browser: Pico Browser, Twitter, Wolvic
  • Improve browser detection: DuckDuckGo, ICEBrowser, Klar, QQ, Sleipnir
  • Improve device detection: Oculus Quest & Oppo Pad
  • Update latest client hints spec: formFactor -> formFactors
  • In ua-parser-js/extensions submodule, bots divided into crawler / fetcher

Readme

Source

UAParser.js

The most comprehensive, compact, & up-to-date isomorphic JavaScript library to detect user's Browser, Engine, OS, CPU, and Device type/model. Runs either in browser (client-side) or node.js (server-side).

License Options

Open-Source EditionsPRO / Commercial Editions
License optionsMITAGPLPRO PersonalPRO BusinessPRO Enterprise
Browser detection⚠️
CPU detection⚠️
Device detection⚠️
Engine detection⚠️
OS detection⚠️
Enhanced detection⛔️
Client Hints support⛔️
Extras (Apps, Bots, Libs, Emails, Media Players, etc)⛔️
CommonJS support
ES modules support⛔️
npm module available
TypeScript declarations available⚠️
Allowed for commercial use⛔️
Permissive (non-copyleft) license⛔️
Unlimited use per 1 license⚠️
1-year support⛔️⛔️
Lifetime updates
PriceFREE (License)FREE (License)$12 (License)$25 (License)$500 (License)
GET THE PRO PACKAGES 📥

Version 2.0

Before upgrading from v0.7 / v1.0, please read CHANGELOG to see what's new & breaking.

Documentation

Development

Contributors

Please read CONTRIBUTING guide first for the instruction details.

Made with contributors-img.

Backers & Sponsors

Keywords

FAQs

Last updated on 07 Jun 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc