express-useragent
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -0,0 +0,0 @@ var fs = require('fs') |
@@ -7,3 +7,3 @@ /** | ||
* @package express-useragent | ||
* @version 0.0.9 | ||
* @version 0.1.4 | ||
* @copyright Copyright (c) 2009-2011 - All rights reserved. | ||
@@ -17,3 +17,3 @@ * @license MIT License | ||
var UserAgent = function() { | ||
this.version = '0.0.9'; | ||
this.version = '0.1.4'; | ||
this._Versions = { | ||
@@ -66,2 +66,3 @@ Firefox: /firefox\/([\d\w\.\-]+)/i, | ||
Linux64: /linux x86\_64/i, | ||
ChromeOS: /cros/i, | ||
Wii: /wii/i, | ||
@@ -117,2 +118,3 @@ PS3: /playstation 3/i, | ||
isMac: false, | ||
isChromeOS: false, | ||
isBada: false, | ||
@@ -298,2 +300,5 @@ isSamsung: false, | ||
return 'Linux'; | ||
case this._OS.ChromeOS.test(string): | ||
this.Agent.isChromeOS = true; | ||
return 'Chrome OS'; | ||
case this._OS.Wii.test(string): | ||
@@ -455,2 +460,3 @@ return 'Wii'; | ||
case ua.Agent.isMac: | ||
case ua.Agent.isChromeOS: | ||
ua.Agent.isDesktop = true; | ||
@@ -509,3 +515,3 @@ break; | ||
var ua = this; | ||
if (/googlebot|gurujibot|twitterbot|yandexbot|slurp|msnbot|bingbot|facebookexternalhit/i.test(ua.Agent.source)) { | ||
if (/googlebot|gurujibot|yandexbot|slurp|msnbot|bingbot|facebookexternalhit/i.test(ua.Agent.source)) { | ||
ua.Agent.isBot = true; | ||
@@ -512,0 +518,0 @@ } |
{ | ||
"name": "express-useragent", | ||
"description": "ExpressJS/Connect/TrinteJS user-agent middleware exposing", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"homepage": "https://github.com/biggora/express-useragent/", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -16,3 +16,3 @@ /** | ||
var Express = require('express') | ||
, App = Express.createServer() | ||
, App = Express() | ||
, Useragent = require('./../lib/express-useragent'); | ||
@@ -19,0 +19,0 @@ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
73325
1726