express-useragent
express-useragent copied to clipboard
Outsource useragent detection
The browscap-js package uses the browscap database, which is the most exhaustive and active database of useragents I could find. It allows for easy useragent string parsing like so:
var Browscap = require('browscap-js');
var browscap = new Browscap();
var browser = browscap.getBrowser("Googlebot/2.1 (+http://www.google.com/bot.html)");
//Will log `true`
console.log(browser.Crawler);
Seems like a lot of the PR's for this repo are just adding bots, which is a duplication of the work done on browscap. Maybe it would be better to just use browscap-js under the hood and have this package be the interface for express.
This would be great, It's the reason I'm avoiding this package for now