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

resolve-accept-language

Package Overview
Dependencies
Maintainers
1
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-accept-language - npm Package Compare versions

Comparing version 1.0.38 to 1.0.39

4

lib/locale.js

@@ -13,3 +13,3 @@ "use strict";

if (!Locale.isLocale(identifier, false)) {
throw new Error("invalid locale identifier '" + identifier + "'");
throw new Error("invalid locale identifier '".concat(identifier, "'"));
}

@@ -19,3 +19,3 @@ var _a = identifier.split('-'), languageCode = _a[0], countryCode = _a[1];

this.countryCode = countryCode.toUpperCase();
this.identifier = this.languageCode + "-" + this.countryCode;
this.identifier = "".concat(this.languageCode, "-").concat(this.countryCode);
}

@@ -22,0 +22,0 @@ /**

@@ -21,3 +21,3 @@ "use strict";

if (!locale_1.default.isLocale(identifier)) {
throw new Error("invalid locale identifier '" + identifier + "'");
throw new Error("invalid locale identifier '".concat(identifier, "'"));
}

@@ -37,3 +37,3 @@ if (!this.localesAndLanguagesByQuality[quality]) {

if (!locale_1.default.isLanguageCode(languageCode)) {
throw new Error("invalid ISO 639-1 alpha-2 language code '" + languageCode + "'");
throw new Error("invalid ISO 639-1 alpha-2 language code '".concat(languageCode, "'"));
}

@@ -53,3 +53,3 @@ if (!this.localesAndLanguagesByQuality[quality]) {

if (!locale_1.default.isLanguageCode(languageCode)) {
throw new Error("invalid ISO 639-1 alpha-2 language code '" + languageCode + "'");
throw new Error("invalid ISO 639-1 alpha-2 language code '".concat(languageCode, "'"));
}

@@ -56,0 +56,0 @@ if (!this.unsupportedLocaleLanguagesByQuality[quality]) {

@@ -86,4 +86,4 @@ "use strict";

var quality = matchedQuality === undefined ? '1' : parseFloat(matchedQuality).toString(); // Remove trailing zeros.
var locale = countryCode ? languageCode + "-" + countryCode : undefined;
var locale = countryCode ? "".concat(languageCode, "-").concat(countryCode) : undefined;
return { locale: locale, languageCode: languageCode, quality: quality };
}
{
"name": "resolve-accept-language",
"version": "1.0.38",
"version": "1.0.39",
"description": "Resolve the preferred locale based on the value of an `Accept-Language` HTTP header.",

@@ -40,7 +40,7 @@ "author": "Avansai (https://avansai.com)",

"@release-it/conventional-changelog": "^3.3.0",
"@types/jest": "^27.0.2",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"@types/jest": "^27.0.3",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"dotenv-cli": "^4.1.0",
"eslint": "^8.2.0",
"eslint": "^8.3.0",
"eslint-config-prettier": "^8.3.0",

@@ -50,7 +50,7 @@ "eslint-plugin-jest": "^25.2.4",

"prettier": "2.4.1",
"release-it": "^14.11.7",
"release-it": "^14.11.8",
"ts-jest": "^27.0.7",
"ts-node": "^10.4.0",
"typescript": "^4.4.4"
"typescript": "^4.5.2"
}
}
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