bm-useragent

1.0.1 • Public • Published

Usage 用法

var bmUserAgent = require('bm-useragent');

function someMiddleware(req, res, next) {
  var ua = bmUserAgent(req.headers['user-agent']);
  if(ua.mobile)
    return res.send('Please open it at desktop.');
  return next();
}

API

Properties

  • mobile
  • ios
  • mobileSafari
  • android
  • android4_4
  • qqbrowser
  • meizu
  • weixin

Package Sidebar

Install

npm i bm-useragent

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bammoo