Skip to content

Kikobeats/top-user-agents

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

top-user-agents

Last version NPM Status

A list of most common User Agent used on Internet.

The list is auto generated, always up to date with the most common user agents.

Install

$ npm install top-user-agents --save

Usage

const userAgents = require('top-user-agents')
const uniqueRandomArray = require('unique-random-array')

console.log(userAgents[0])
// => Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36

const randomUserAgent = uniqueRandomArray(userAgents)
console.log(randomUserAgent())
// => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36

Related

top-user-agents © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats