🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

accept-language-parser

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accept-language-parser - npm Package Compare versions

Comparing version

to
1.3.0

2

index.js

@@ -1,2 +0,2 @@

var regex = /((([a-zA-Z]+(-[a-zA-Z]+){0,2})|\*)(;q=[0-1](\.[0-9]+)?)?)*/g;
var regex = /((([a-zA-Z]+(-[a-zA-Z0-9]+){0,2})|\*)(;q=[0-1](\.[0-9]+)?)?)*/g;

@@ -3,0 +3,0 @@ module.exports.parse = function(al){

{
"name": "accept-language-parser",
"version": "1.2.0",
"version": "1.3.0",
"description": "Parse the accept-language header from a HTTP request",

@@ -29,4 +29,4 @@ "main": "index.js",

"grunt-mocha-test": "^0.10.0",
"should": "^10.0.0"
"should": "^11.0.0"
}
}

@@ -52,2 +52,7 @@ var parser = require("../index.js");

it('should correctly parse a region with numbers', function(){
var result = parser.parse('fr-150');
assertResult({ code: 'fr', region: '150', quality: 1.0}, result[0]);
});
it('should correctly parse complex set', function(){

@@ -54,0 +59,0 @@ var result = parser.parse('fr-CA,fr;q=0.8,en-US;q=0.6,en;q=0.4,*;q=0.1');