random-mua

0.5.0 • Public • Published
random-mua

npm gzip size install size Build Status LICENSE

Random Modern User-Agent.

Install

yarn add random-mua
# or 
npm install random-mua

Usage

const randomMua = require('random-mua')
 
/**
 * desktop user agent
 */
console.log(randomMua())
// Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
console.log(randomMua())
// Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3622.0 Safari/537.36
 
/**
 * mobile user agent
 */
console.log(randomMua('m'))
// Mozilla/5.0 (Linux; Android 7.0; Redmi Note 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36
console.log(randomMua('mobile'))
// Mozilla/5.0 (Linux; Android 7.0; FRD-L04) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Mobile Safari/537.36

More

From Browser Market Share Worldwide:

Chrome > 64%
Safari > 16%

From Browser Version Market Share Worldwide and Top 10 Web Browsers:

Chrome version >= 70
Safari version >= 12

Count:

226 (desktop)
296 (mobile)

License

Anti 996

Package Sidebar

Install

npm i random-mua

Weekly Downloads

48

Version

0.5.0

License

Anti 996

Unpacked Size

68.6 kB

Total Files

6

Last publish

Collaborators

  • yahtnif