Nondeterministic Programming Methodology

npm

Need private packages and team management tools?Check out npm Orgs. »

browser-agents

1.0.1 • Public • Published

browser-agents

This module exports properties for each of the major browser families (IE, Opera, Firefox, Chrome, and Safari).

Within those objects, is another object with each version (i.e. '35.0').

And within those objects is an array containing known user agent strings for that browser and version.

To get a random user agent string for any version of any browser:

var agents = require('browser-agents');
agents.random();

To get a random user agent string for a specific browser:

var agents = require('browser-agents');
agents.Chrome.random();
agents.Opera.random();
agents.Safari.random();
agents.Firefox.random();
agents.IE.random();

And to get a user agent string for a specific version of a specific browser:

var agents = require('browser-agents');
agents.Chrome['34.0'];

install

npm i browser-agents

Downloadsweekly downloads

8

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability