express-caniuse
Express/Connect middleware for automatically determining browser capabilities
Description
This express middleware parses the user-agent of the incoming request, compares
it to the Can I use database and adds an additional
capabilities
object to the req
, showing which predetermined browser
features are supported. Use it for analytics or for conditional rendering, for
example!
Usage
npm install --save --production express-caniuse
var express = ;var canIUseMiddleware = ; var app = ; app; app;
If the browser could not be determined due to missing/unknown user-agent
header, req.capabilities
will be an empty object.
License
MIT © Matti Jokitulppo