express-mobile-agent
Express wrapper for mobile-agent
Last updated 8 years ago by scryptmouse .
Original npm · Tarball · package.json
$ cnpm install express-mobile-agent 
SYNC missed versions from official npm registry.

express-mobile-agent

What?

A Connect or Express middleware wrapper around mobile-agent.

Usage

Add to dependencies in package.json or install with NPM.

Then, in an express / connect application:

app.use(require('express-mobile-agent'));

The middleware adds an agent object to req as well as res.locals, accessible from views.

When the object is coerced to string (e.g. in a Jade template), it will return either 'mobile' or 'not-mobile'.

License

MIT

Current Tags

  • 0.0.1                                ...           latest (8 years ago)

1 Versions

  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |