Socket
Socket
Sign inDemoInstall

@formatjs/intl-localematcher

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/intl-localematcher - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

7

abstract/utils.js

@@ -152,6 +152,7 @@ "use strict";

}
supportedLocales.forEach(function (supported, j) {
supportedLocales.forEach(function (supported) {
// Add some weight to the distance based on the order of the supported locales
// Add penalty for the order of the requested locales
var distance = findMatchingDistance(desired, supported) + j + i * 40;
// Add penalty for the order of the requested locales, which currently is 0 since ECMA-402
// doesn't really have room for weighted locales like `en; q=0.1`
var distance = findMatchingDistance(desired, supported) + 0 + i * 40;
result.distances[desired][supported] = distance;

@@ -158,0 +159,0 @@ if (distance < lowestDistance) {

@@ -147,6 +147,7 @@ import { __spreadArray } from "tslib";

}
supportedLocales.forEach(function (supported, j) {
supportedLocales.forEach(function (supported) {
// Add some weight to the distance based on the order of the supported locales
// Add penalty for the order of the requested locales
var distance = findMatchingDistance(desired, supported) + j + i * 40;
// Add penalty for the order of the requested locales, which currently is 0 since ECMA-402
// doesn't really have room for weighted locales like `en; q=0.1`
var distance = findMatchingDistance(desired, supported) + 0 + i * 40;
result.distances[desired][supported] = distance;

@@ -153,0 +154,0 @@ if (distance < lowestDistance) {

{
"name": "@formatjs/intl-localematcher",
"version": "0.5.3",
"version": "0.5.4",
"description": "Intl.LocaleMatcher ponyfill",

@@ -5,0 +5,0 @@ "keywords": [

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