express-useragent
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -7,3 +7,3 @@ /** | ||
* @package express-useragent | ||
* @version 0.0.5 | ||
* @version 0.0.6 | ||
* @copyright Copyright (c) 2009-2012 - All rights reserved. | ||
@@ -10,0 +10,0 @@ * @license MIT License |
@@ -7,3 +7,3 @@ /** | ||
* @package express-useragent | ||
* @version 0.0.5 | ||
* @version 0.0.6 | ||
* @copyright Copyright (c) 2009-2011 - All rights reserved. | ||
@@ -17,3 +17,3 @@ * @license MIT License | ||
var UserAgent = function() { | ||
this.version = '0.0.5'; | ||
this.version = '0.0.6'; | ||
this._Versions = { | ||
@@ -296,3 +296,3 @@ Firefox: /firefox\/([\d\w\.\-]+)/i, | ||
return function(req, res, next) { | ||
var source = req.headers['user-agent'], | ||
var source = req.headers['user-agent'] || '', | ||
ua = new UserAgent(); | ||
@@ -315,2 +315,2 @@ if(typeof source == 'undefined') { source = "unknown"; } | ||
exports = module.exports = new UserAgent(); | ||
exports = module.exports = new UserAgent(); |
{ | ||
"name": "express-useragent", | ||
"description": "ExpressJS user-agent middleware", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"homepage": "https://github.com/biggora/express-useragent/", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -0,1 +1,2 @@ | ||
[![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/) | ||
@@ -2,0 +3,0 @@ |
33957
9
815
118