Get a user agent string across all JavaScript Runtime Environments
Search packages..
universal-user-agentSimilar Packages:
Npm Package Weekly Downloads Trend
3 Years
🌟 Show real-time usage chart on universal-user-agent's README.md, just copy the code below.
## Usage Trend
[](https://npm-compare.com/universal-user-agent#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 Show GitHub stars trend chart on universal-user-agent's README.md, just copy the code below.
## GitHub Stars Trend
[](https://npm-compare.com/universal-user-agent)
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
Â
Â
Â
Â
Â
Â
Â
universal-user-agent
16,339,704
22
10.1 kB
0
6 months ago
ISC
Popular Comparisons
universal-user-agent
README for universal-user-agent
universal-user-agent
Get a user agent string across all JavaScript Runtime Environments
import { getUserAgent } from "universal-user-agent";
const userAgent = getUserAgent();
// userAgent will look like this
// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0"
// in node: Node.js/v8.9.4 (macOS High Sierra; x64)