express-useragent
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -51,3 +51,11 @@ /*! | ||
'ia_archiver', | ||
'pinterest' | ||
'pinterest', | ||
'skypeuripreview', | ||
'odklbot', | ||
'archive.org_bot', | ||
'ltx71', | ||
'guzzlehttp', | ||
'vkshare', | ||
'discordbot', | ||
'whatsapp' | ||
]; | ||
@@ -107,3 +115,4 @@ var IS_BOT_REGEXP = new RegExp('^.*(' + BOTS.join('|') + ').*$'); | ||
Windows2000: /windows nt 5\.0/i, | ||
WindowsPhone8: /windows phone 8\./, | ||
WindowsPhone81: /windows phone 8\.1/i, | ||
WindowsPhone80: /windows phone 8\.0/i, | ||
OSXCheetah: /os x 10[._]0/i, | ||
@@ -238,5 +247,2 @@ OSXPuma: /os x 10[._]1(\D|$)/i, | ||
return 'Chrome'; | ||
case this._Browsers.Safari.test(string): | ||
this.Agent.isSafari = true; | ||
return 'Safari'; | ||
case this._Browsers.WinJs.test(string): | ||
@@ -248,2 +254,5 @@ this.Agent.isWinJs = true; | ||
return 'IE'; | ||
case this._Browsers.Safari.test(string): | ||
this.Agent.isSafari = true; | ||
return 'Safari'; | ||
case this._Browsers.PS3.test(string): | ||
@@ -393,4 +402,8 @@ return 'ps3'; | ||
return 'Windows 2000'; | ||
case this._OS.WindowsPhone8.test(string): | ||
return 'Windows Phone 8'; | ||
case this._OS.WindowsPhone81.test(string): | ||
this.Agent.isWindowsPhone = true; | ||
return 'Windows Phone 8.1'; | ||
case this._OS.WindowsPhone80.test(string): | ||
this.Agent.isWindowsPhone = true; | ||
return 'Windows Phone 8.0'; | ||
case this._OS.Linux64.test(string): | ||
@@ -397,0 +410,0 @@ this.Agent.isLinux = true; |
{ | ||
"name": "express-useragent", | ||
"description": "ExpressJS/Connect/TrinteJS user-agent middleware exposing", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"homepage": "https://github.com/biggora/express-useragent/", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -501,3 +501,3 @@ /** | ||
exports['Windows Phone 8'] = function (test) { | ||
exports['Windows Phone 8.0'] = function (test) { | ||
@@ -533,2 +533,33 @@ var s = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; ' + | ||
exports['Windows Phone 8.1'] = function (test) { | ||
var s = 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; ' + | ||
'Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 920) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537'; | ||
var a = ua.parse(s); | ||
test.ok(a.isAuthoritative, 'Authoritative'); | ||
test.ok(a.isMobile, 'Mobile'); | ||
test.ok(!a.isiPad, 'iPad'); | ||
test.ok(!a.isiPod, 'iPod'); | ||
test.ok(!a.isiPhone, 'iPhone'); | ||
test.ok(!a.isAndroid, 'Android'); | ||
test.ok(!a.isBlackberry, 'Blackberry'); | ||
test.ok(!a.isOpera, 'Opera'); | ||
test.ok(a.isIE, 'IE'); | ||
test.ok(!a.isSafari, 'Safari'); | ||
test.ok(!a.isFirefox, 'Firefox'); | ||
test.ok(!a.isWebkit, 'Webkit'); | ||
test.ok(!a.isChrome, 'Chrome'); | ||
test.ok(!a.isKonqueror, 'Konqueror'); | ||
test.ok(!a.isDesktop, 'Desktop'); | ||
test.ok(!a.isWindows, 'Windows'); | ||
test.ok(a.isWindowsPhone, 'Windows Phone'); | ||
test.ok(!a.isLinux, 'Linux'); | ||
test.ok(!a.isMac, 'Mac'); | ||
test.equal(a.version, '11.0'); | ||
test.done(); | ||
}; | ||
exports['OS X OmniWeb 622'] = function (test) { | ||
@@ -535,0 +566,0 @@ |
115037
2342