$ cnpm install is-firefox
Check if browser is Firefox
User agent sniffing is considered bad practice and should be avoided if possible.
$ npm install --save is-firefox
var isFirefox = require('is-firefox');
console.log(isFirefox);
//=> false
MIT © Andreas Gillström
Copyright 2013 - present © cnpmjs.org