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

express-negotiator

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-negotiator - npm Package Compare versions

Comparing version 0.5.0 to 1.0.0

7

lib/expressNegotiator.js

@@ -216,2 +216,9 @@ var fs = require('fs'),

var userAgentInfo = mario(userAgentString) || {};
// If we have IE on device other than phone always show desktop version
// We do not want IE 11 on windows surface device to get touch version
if (userAgentInfo.explorer && !userAgentInfo.windowsPhone) {
userAgentInfo.touch = false;
}
userAgentTypes.forEach(function (userAgentType) {

@@ -218,0 +225,0 @@ if (!userAgentInfo[userAgentType]) {

6

package.json

@@ -25,3 +25,3 @@ {

],
"version": "0.5.0",
"version": "1.0.0",
"engines": {

@@ -32,3 +32,3 @@ "node": "*"

"async": "0.2.8",
"mario": "1.4.1",
"mario": "1.8.0",
"memoizeasync": "0.9.0",

@@ -43,3 +43,3 @@ "memoizesync": "0.5.0",

"mocha": "1.13.0",
"unexpected": "1.0.1"
"unexpected": "^10.26.3"
},

@@ -46,0 +46,0 @@ "main": "lib/expressNegotiator.js",

@@ -81,3 +81,4 @@ var Path = require('path'),

createTest('/baz Accept: */html, a non-touch user agent and userAgent:true', {url: '/baz', headers: {accept: '*/html', 'user-agent': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)'}}, '/baz.nontouch.html', {userAgent: true});
createTest('/baz Accept: */html, a touch user agent and userAgent:true', {url: '/baz', headers: {accept: '*/html', 'user-agent': 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch)'}}, '/baz.touch.html', {userAgent: true});
createTest('/baz Accept: */html, a touch user agent and userAgent:true', {url: '/baz', headers: {accept: '*/html', 'user-agent': 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 820)'}}, '/baz.touch.html', {userAgent: true});
createTest('/baz Accept: */html, a windows touch surface user agent and userAgent:true', {url: '/baz', headers: {accept: '*/html', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko'}}, '/baz.nontouch.html', {userAgent: true});

@@ -84,0 +85,0 @@ createTest('a non-locale id and non-mario extension in the request url should be honored, and if a variant has it, it should be preferred', {url: '/index.nocdn', headers: {accept: '*/html'}}, '/index.nocdn.en_US.html');

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