Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-useragent

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-useragent - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

19

lib/express-useragent.js

@@ -30,3 +30,4 @@ /**

Flock: /flock\/([\d\w\.\-]+)/i,
Epiphany: /epiphany\/([\d\w\.\-]+)/i
Epiphany: /epiphany\/([\d\w\.\-]+)/i,
WinJs: /msapphost\/([\d\w\.\-]+)/i
};

@@ -47,5 +48,7 @@ this._Browsers = {

PSP: /playstation portable/i,
Firefox: /firefox/i
Firefox: /firefox/i,
WinJs: /msapphost/i
};
this._OS = {
Windows81: /windows nt 6\.3/i,
Windows8: /windows nt 6\.2/i,

@@ -116,2 +119,3 @@ Windows7: /windows nt 6\.1/i,

isAndroidTablet : false,
isWinJs: false,
Browser : 'unknown',

@@ -154,2 +158,5 @@ Version : 'unknown',

return 'Safari';
case this._Browsers.WinJs.test(string):
this.Agent.isWinJs = true;
return 'WinJs';
case this._Browsers.IE.test(string):

@@ -201,2 +208,7 @@ this.Agent.isIE = true;

break;
case 'WinJs':
if (this._Versions.WinJs.test(string)){
return RegExp.$1;
}
break;
case 'IE':

@@ -261,2 +273,5 @@ if (this._Versions.IE.test(string)) {

return 'Windows 8';
case this._OS.Windows81.test(string):
this.Agent.isWindows = true;
return 'Windows 8.1';
case this._OS.Windows2003.test(string):

@@ -263,0 +278,0 @@ this.Agent.isWindows = true;

{
"name": "express-useragent",
"description": "ExpressJS/Connect user-agent middleware exposing",
"version": "0.0.11",
"description": "ExpressJS/Connect/TrinteJS user-agent middleware exposing",
"version": "0.0.12",
"homepage": "https://github.com/biggora/express-useragent/",

@@ -10,3 +10,33 @@ "repository": {

},
"author": "Aleksej Gordejev <aleksej@gordejev.lv> (https://github.com/biggora/)",
"author": {
"name": "Aleksej Gordejev",
"email" : "aleksej@gordejev.lv",
"url": "https://github.com/biggora"
},
"contributors": [
{
"name": "Kacper Glowacki",
"url": "https://github.com/kacperus"
},
{
"name": "elisee",
"url": "https://github.com/elisee"
},
{
"name": "Bitdeli Chef",
"url": "https://github.com/bitdeli-chef"
},
{
"name": "Nicolas Tobo",
"url": "https://github.com/nicolastobo"
},
{
"name": "Samy Pess�",
"url": "https://github.com/SamyPesse"
},
{
"name": "Artem Nezvigin",
"url": "https://github.com/artnez"
}
],
"keywords": [

@@ -13,0 +43,0 @@ "useragent",

@@ -164,2 +164,7 @@ [![build status](https://secure.travis-ci.org/biggora/express-useragent.png)](http://travis-ci.org/biggora/express-useragent)

- Follow [@biggora](https://twitter.com/#!/biggora) on Twitter for updates.
- Report issues on the [github issues](https://github.com/biggora/express-useragent/issues) page.
- Report issues on the [github issues](https://github.com/biggora/express-useragent/issues) page.
[![Analytics](https://ga-beacon.appspot.com/UA-22788134-5/express-useragent/readme)](https://github.com/igrigorik/ga-beacon)
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/biggora/express-useragent/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

@@ -187,2 +187,33 @@ /**

exports['Windows 8.1 WinJs'] = function(test) {
var s = 'Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; MSAppHost/2.0; rv:11.0) like Gecko';
var a = ua.parse(s);
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.isWinJs, 'WinJs');
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.isLinux, 'Linux');
test.ok(!a.isMac, 'Mac');
test.ok(!a.isWindowsPhone, 'Windows Phone');
test.equal(a.Version, '2.0');
test.equal(a.OS, 'Windows 8.1');
test.done();
};
exports['Windows 7 Firefox 23'] = function(test) {

@@ -189,0 +220,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc