get-user-agent
v4.0.1
Published
easily generate a useragent
Downloads
93
Maintainers
Readme
get-user-agent
Easily generate a browser user-agent!
Install
npm install --save get-user-agent
Example Usage
const useragent = require('get-user-agent');
console.log(useragent.firefox(62));
Functions
chrome(version, sysInfo) ⇒ string
Chrome Useragent
Returns: string - Useragent
| Param | Type | Description | | --- | --- | --- | | version | number | string | Browser version | | sysInfo | string | System info |
chromeAdvanced(version, webkitVersion, sysInfo) ⇒ string
Chrome Useragent with advanced options
Returns: string - Useragent
| Param | Type | Description | | --- | --- | --- | | version | number | string | Browser version | | webkitVersion | number | string | Webkit version | | sysInfo | string | System info |
firefox(version, sysInfo) ⇒ string
Safari Useragent
Returns: string - Useragent
| Param | Type | Description | | --- | --- | --- | | version | number | string | Browser version | | sysInfo | string | System info |
firefoxAdvanced(version, geckoVersion, sysInfo) ⇒ string
Firefox Useragent with advanced options
Returns: string - Useragent
| Param | Type | Description | | --- | --- | --- | | version | number | string | Browser version | | geckoVersion | number | string | Gecko version | | sysInfo | string | System info |
opera(version, sysInfo) ⇒ string
Opera Useragent
Returns: string - Useragent
| Param | Type | Description | | --- | --- | --- | | version | number | string | Browser version | | sysInfo | string | System info |
operaAdvanced(version, prestoVersion, operaVersion, sysInfo) ⇒ string
Opera Useragent with advanced options
Returns: string - Useragent
| Param | Type | Description | | --- | --- | --- | | version | number | string | Browser version | | prestoVersion | number | string | Presto version | | operaVersion | number | string | Opera version | | sysInfo | string | System info |
safari(version, sysInfo) ⇒ string
Safari Useragent
Returns: string - Useragent
| Param | Type | Description | | --- | --- | --- | | version | number | string | Browser version | | sysInfo | string | System info |
safariAdvanced(version, webkitBuildVersion, safariBuildVersion, sysInfo) ⇒ string
Safari Useragent with advanced options
Returns: string - Useragent
| Param | Type | Description | | --- | --- | --- | | version | number | string | Browser version | | webkitBuildVersion | number | string | Webkit build version | | safariBuildVersion | number | string | Safari build version | | sysInfo | string | System info |