Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 22, 2024 via pnpm
Package summary
Share
0
issues
1
license
1
MIT
Package created
28 Jul 2012
Version published
27 Oct 2023
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
ua-parser-js@1.0.37
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of ua-parser-js 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does ua-parser-js do?

UA-Parser-JS is a practical Javascript library that identifies the browser, engine, operating system, CPU, and device type/model by parsing the user-agent data. This library supports both browser and node.js environment, providing detailed user context that can be essential in various use-cases, like tracking how users interact with web content, developing responsive UI, or for statistical purposes. Robust tracing of this information helps in enhancing the performance and user experience on your website or application.

How do you use ua-parser-js?

To use the UA-Parser-JS, at first, you need to install it through the npm package manager, by running the command npm install ua-parser-js. In node.js environment, the basic usage would look something like this:

var parser = require('ua-parser-js');
var ua = parser('User-Agent string goes here');
console.log(ua.browser); // Outputs the browser info from user-agent string

In the browser, you can include the ua-parser.min.js in your html file and use it like so:

<script src="ua-parser.min.js"></script>
<script>
    var parser = new UAParser();
    var result = parser.getResult();
    console.log(result.browser);        // Output: Browser's name and version
</script>

Noteworthy methods provided by the library include getResult(), getBrowser(), getDevice(), getEngine(), getOS(), getCPU(), getUA(), and setUA(user-agent).

Where are the ua-parser-js docs?

The documentation for UA-Parser-JS helps in understanding the usage and helps in accessing the desired information. There are two versions available and can be accessed at the following links:

For customized usage, the documentation provides in-depth explanation on creating extensions as well. Multiple demos and examples are also provided in the documentation to ensure an easy understanding of the library's functionality.