Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ua-parser-js

Package Overview
Dependencies
Maintainers
0
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13M
decreased by-12.32%
Maintainers
0
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc