0.1.2 • Published 9 years ago
browser-detector v0.1.2
browser-dectector
A wrapper over ua-parser-js that will also add the detected classes to the html element
Install
npm i --save browser-dectector
Usage
var env = require('browser-dectector');
// after the module has been required
// the html element will have the classes for the browser, os, device and engine
// this is useful to add certain classes only to a given browser
// mostly because of msie9-msie10 is still out there
// env.browser.name
// env.browser.version
// env.device
// env.engine
// check for https://www.npmjs.com/package/ua-parser-js