https://github.com/gr2m/universal-user-agent
Get a user agent string in both browser and node
https://github.com/gr2m/universal-user-agent
Last synced: about 1 year ago
JSON representation
Get a user agent string in both browser and node
- Host: GitHub
- URL: https://github.com/gr2m/universal-user-agent
- Owner: gr2m
- License: isc
- Created: 2018-09-17T22:59:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T21:21:50.000Z (about 2 years ago)
- Last Synced: 2024-10-29T13:04:25.732Z (over 1 year ago)
- Language: JavaScript
- Size: 931 KB
- Stars: 19
- Watchers: 7
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# universal-user-agent
> Get a user agent string across all JavaScript Runtime Environments
[](https://www.npmjs.com/package/universal-user-agent)
[](https://github.com/gr2m/universal-user-agent/actions/workflows/test.yml?query=workflow%3ATest)
```js
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)
```
## License
[ISC](LICENSE.md)