Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    express-mobile-agentpublic

    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

    Keywords

    none

    install

    npm i express-mobile-agent

    Downloadslast 7 days

    2

    version

    0.0.1

    license

    none

    last publish

    collaborators

    • avatar