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

negotiator

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

negotiator - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

5

HISTORY.md

@@ -0,1 +1,6 @@

0.6.2 / 2019-04-29
==================
* Fix sorting charset, encoding, and language with extra parameters
0.6.1 / 2016-05-02

@@ -2,0 +7,0 @@ ==================

4

lib/charset.js

@@ -61,4 +61,4 @@ /**

var params = match[2].split(';')
for (var i = 0; i < params.length; i ++) {
var p = params[i].trim().split('=');
for (var j = 0; j < params.length; j++) {
var p = params[j].trim().split('=');
if (p[0] === 'q') {

@@ -65,0 +65,0 @@ q = parseFloat(p[1]);

@@ -77,4 +77,4 @@ /**

var params = match[2].split(';');
for (var i = 0; i < params.length; i ++) {
var p = params[i].trim().split('=');
for (var j = 0; j < params.length; j++) {
var p = params[j].trim().split('=');
if (p[0] === 'q') {

@@ -81,0 +81,0 @@ q = parseFloat(p[1]);

@@ -35,6 +35,6 @@ /**

for (var i = 0, j = 0; i < accepts.length; i++) {
var langauge = parseLanguage(accepts[i].trim(), i);
var language = parseLanguage(accepts[i].trim(), i);
if (langauge) {
accepts[j++] = langauge;
if (language) {
accepts[j++] = language;
}

@@ -59,4 +59,4 @@ }

var prefix = match[1],
suffix = match[2],
full = prefix;
suffix = match[2],
full = prefix;

@@ -68,4 +68,4 @@ if (suffix) full += "-" + suffix;

var params = match[3].split(';')
for (var i = 0; i < params.length; i ++) {
var p = params[i].split('=');
for (var j = 0; j < params.length; j++) {
var p = params[j].split('=');
if (p[0] === 'q') q = parseFloat(p[1]);

@@ -72,0 +72,0 @@ }

{
"name": "negotiator",
"description": "HTTP content negotiation",
"version": "0.6.1",
"version": "0.6.2",
"contributors": [

@@ -21,4 +21,6 @@ "Douglas Christopher Wilson <doug@somethingdoug.com>",

"devDependencies": {
"istanbul": "0.4.3",
"mocha": "~1.21.5"
"eslint": "5.16.0",
"eslint-plugin-markdown": "1.0.0",
"mocha": "6.1.4",
"nyc": "14.0.0"
},

@@ -36,6 +38,7 @@ "files": [

"scripts": {
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
"test-cov": "nyc --reporter=html --reporter=text npm test",
"test-travis": "nyc --reporter=text npm test"
}
}
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