@oreefy/useragent
v1.0.0
Published
Lightweight User-Agent parser for detecting IP, bots, browsers, devices, and CPU architecture.
Maintainers
Readme
@oreefy/useragent
Lightweight User-Agent parser for detecting IP, bots, browsers, devices, and CPU architecture.
@oreefy/useragent is a library built for the Oreefy ecosystem. The package is officially developed, maintained, and fully controlled by Oreefy, ensuring long-term stability, consistency, and compatibility across the ecosystem.
Required Capabilities
- JavaScript / TypeScript
- Native
Headersapi - Backend/server-side application
API Reference
The following example demonstrates a typical server-side usage:
import { useragent } from "@oreefy/useragent";
async function example() {
const ua = useragent(request.headers);
console.log(ua.ip); // string
console.log(ua.isBot); // boolean
console.log(ua.browser); // string
console.log(ua.device); // string
console.log(ua.cpu); // string
}
example();Return Values
| Property | Type | Default | Description |
| --------- | --------- | --------- | -------------------------------------------- |
| ip | string | 0.0.0.0 | Client IP address |
| isBot | boolean | false | Whether the request appears to be from a bot |
| browser | string | Unknown | Detected browser |
| device | string | Unknown | Detected device/OS |
| cpu | string | Unknown | Detected CPU architecture |
Supported Detection
- Browsers: Chrome, Edge, Brave, Firefox, Tor, Samsung, Opera, Vivaldi, Yandex, Safari
- Devices: iPhone, iPad, Android, Windows, Mac, Ubuntu, Linux, Mobile
- CPU: x64, arm64, x86, arm
Note: Detection is based on request headers and User-Agent data. Results may vary depending on the browser, client, proxy, or privacy settings.
About Oreefy
Oreefy is an affordable business ecosystem designed for small to enterprise businesses. Oreefy provides essential software you need for your modern business within a single ecosystem. It will save you significant time, effort, and money.
License
MIT © Oreefy
