项目作者: fscherwi

项目描述 :
easily generate a browser useragent
高级语言: JavaScript
项目地址: git://github.com/fscherwi/get-user-agent.git
创建时间: 2015-09-05T12:46:43Z
项目社区:https://github.com/fscherwi/get-user-agent

开源协议:MIT License

下载


get-user-agent

Build Status Coverage Status

Easily generate a browser user agent!

Install

  1. npm install get-user-agent

Example Usage

  1. const useragent = require('get-user-agent');
  2. console.log(useragent.firefox(75));

Functions


chrome(version, [sysInfo])string

Chrome user agent



chromeAdvanced(version, webkitVersion, [sysInfo])string

Chrome user agent with advanced options



firefox(version, [sysInfo])string

Safari user agent



firefoxAdvanced(version, geckoVersion, [sysInfo])string

Firefox user agent with advanced options



opera(version, [sysInfo])string

Opera user agent



operaAdvanced(version, prestoVersion, operaVersion, [sysInfo])string

Opera user agent with advanced options



safari(version, [sysInfo])string

Safari user agent



safariAdvanced(version, webkitBuildVersion, safariBuildVersion, [sysInfo])string

Safari user agent with advanced options



chrome(version, [sysInfo]) ⇒ string

Chrome user agent

Returns: string - User agent

Param Type Description
version number \ string Browser version
sysInfo (optional) string System information

chromeAdvanced(version, webkitVersion, [sysInfo]) ⇒ string

Chrome user agent with advanced options

Returns: string - User agent

Param Type Description
version number \ string Browser version
webkitVersion number \ string Webkit version
sysInfo (optional) string System information

firefox(version, [sysInfo]) ⇒ string

Safari user agent

Returns: string - User agent

Param Type Description
version number \ string Browser version
sysInfo (optional) string System information

firefoxAdvanced(version, geckoVersion, [sysInfo]) ⇒ string

Firefox user agent with advanced options

Returns: string - User agent

Param Type Description
version number \ string Browser version
geckoVersion number \ string Gecko version
sysInfo (optional) string System information

opera(version, [sysInfo]) ⇒ string

Opera user agent

Returns: string - User agent

Param Type Description
version number \ string Browser version
sysInfo (optional) string System information

operaAdvanced(version, prestoVersion, operaVersion, [sysInfo]) ⇒ string

Opera user agent with advanced options

Returns: string - User agent

Param Type Description
version number \ string Browser version
prestoVersion number \ string Presto version
operaVersion number \ string Opera version
sysInfo (optional) string System information

safari(version, [sysInfo]) ⇒ string

Safari user agent

Returns: string - User agent

Param Type Description
version number \ string Browser version
sysInfo (optional) string System information

safariAdvanced(version, webkitBuildVersion, safariBuildVersion, [sysInfo]) ⇒ string

Safari user agent with advanced options

Returns: string - User agent

Param Type Description
version number \ string Browser version
webkitBuildVersion number \ string Webkit build version
safariBuildVersion number \ string Safari build version
sysInfo (optional) string System information