approved-browser

1.0.2 • Public • Published

approved-browser

Build Status

Client side detection of required browser versions.

install

npm install approved-browser

usage

var ab = require('approved-browser');
 
ab({
  Chrome : 37
  , Firefox : 28
  , Safari : 6.1
  , strict : false //if true any browser NOT listed will be rejected too.
}, function (approved, ua) {
    if (!approved) {
        //do thing for unapproved browsers such as...
        window.location.href = '/support/unapproved-browser.html';
    }
});

license

MIT

Package Sidebar

Install

npm i approved-browser

Weekly Downloads

4

Version

1.0.2

License

MIT

Last publish

Collaborators

  • wankdanker
  • alexgorbatchev