express-useragent
Advanced tools
Comparing version 0.0.6 to 0.0.7-1
/** | ||
* | ||
* @revision $Id: user-agent.js 2012-03-24 16:21:10 Aleksey $ | ||
* @revision $Id: express-useragent.js 2012-03-24 16:21:10 Aleksey $ | ||
* @created 2011-12-10 17:19:10 | ||
* @category Express Helpers | ||
* @package express-useragent | ||
* @version 0.0.6 | ||
* @version 0.0.7 | ||
* @copyright Copyright (c) 2009-2011 - All rights reserved. | ||
@@ -16,3 +16,3 @@ * @license MIT License | ||
var UserAgent = function() { | ||
this.version = '0.0.6'; | ||
this.version = '0.0.7'; | ||
this._Versions = { | ||
@@ -313,2 +313,2 @@ Firefox: /firefox\/([\d\w\.\-]+)/i, | ||
exports = module.exports = new UserAgent(); | ||
exports = module.exports = new UserAgent(); |
{ | ||
"name": "express-useragent", | ||
"description": "ExpressJS user-agent middleware", | ||
"version": "0.0.6", | ||
"version": "0.0.7-1", | ||
"homepage": "https://github.com/biggora/express-useragent/", | ||
@@ -15,2 +15,5 @@ "repository": { | ||
"express", | ||
"trinte", | ||
"railway", | ||
"compound", | ||
"middleware" | ||
@@ -17,0 +20,0 @@ ], |
[![build status](https://secure.travis-ci.org/biggora/express-useragent.png)](http://travis-ci.org/biggora/express-useragent) | ||
# Middleware exposing user-agent for [ExpressJS](http://expressjs.com/) | ||
# Middleware exposing user-agent for [NodeJS](http://nodejs.org/) | ||
@@ -31,5 +31,21 @@ express-useragent is a simple ExpressJS user-agent middleware exposing user-agent details to your application and views. | ||
### for Express | ||
### for [TrinteJS](http://www.trintejs.com/) | ||
is permanently included | ||
#### manual setup in project config/middleware.js | ||
```js | ||
var useragent = require('express-useragent'); | ||
module.exports = function (app, express) { | ||
app.configure(function () { | ||
app.use(useragent.express()); | ||
}); | ||
}; | ||
``` | ||
### for [ExpressJS](http://expressjs.com/) | ||
```js | ||
var express = require('express') | ||
@@ -46,2 +62,20 @@ , app = express.createServer() | ||
### for [CompoundJS](http://compoundjs.com) | ||
$ compound install https://github.com/biggora/express-useragent.git | ||
#### or manual setup in project config/environment.js | ||
```js | ||
var useragent = require('express-useragent'); | ||
app.configure(function () { | ||
// init useragent | ||
app.use(useragent.express()); | ||
app.use(app.router); | ||
}); | ||
``` | ||
module provides details such as the following: | ||
@@ -79,2 +113,7 @@ | ||
### Recommend extensions | ||
- [TrinteJS](http://www.trintejs.com/) - Javascrpt MVC Framework for Node.JS | ||
- [CaminteJS](http://www.camintejs.com/) - Cross-db ORM for NodeJS | ||
### Startups & Apps | ||
@@ -84,4 +123,5 @@ | ||
- [GorkaTV](https://gorkatv.com/) | ||
- [TrinteJS](http://www.trintejs.com/) | ||
- [CaminteJS](http://www.camintejs.com/) | ||
## Author | ||
@@ -88,0 +128,0 @@ |
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
35795
10
833
158
1