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

@mitm/intl

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mitm/intl - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

8

intl.esm.js

@@ -400,4 +400,4 @@ /**

/**
* Gets the appropriate locale for a request, based on the X-App-Locale header.
* @todo Support HTTP Accept-Language, but keeping X-App-Locale as a first choice, for forcing the locale on a browser.
* Gets the appropriate locale for a request, based on the X-App-Language header.
* @todo Support HTTP Accept-Language, but keeping X-App-Language as a first choice for forcing the locale on a browser.
*

@@ -409,3 +409,5 @@ * @param registry The locales registry to get registered locales from.

function getSupportedLocaleFromRequest(registry, req) {
const wanted = req.headers['x-app-locale'];
var _a;
const wanted = (_a = req.headers['x-app-language']) !== null && _a !== void 0 ? _a : req.headers['x-app-locale'];
return typeof wanted == 'string' ? registry.getSupportedLocale(wanted) : registry.defaultLocale;

@@ -412,0 +414,0 @@ }

@@ -578,4 +578,4 @@ (function (global, factory) {

/**
* Gets the appropriate locale for a request, based on the X-App-Locale header.
* @todo Support HTTP Accept-Language, but keeping X-App-Locale as a first choice, for forcing the locale on a browser.
* Gets the appropriate locale for a request, based on the X-App-Language header.
* @todo Support HTTP Accept-Language, but keeping X-App-Language as a first choice for forcing the locale on a browser.
*

@@ -587,3 +587,5 @@ * @param registry The locales registry to get registered locales from.

function getSupportedLocaleFromRequest(registry, req) {
var wanted = req.headers['x-app-locale'];
var _a;
var wanted = (_a = req.headers['x-app-language']) !== null && _a !== void 0 ? _a : req.headers['x-app-locale'];
return typeof wanted == 'string' ? registry.getSupportedLocale(wanted) : registry.defaultLocale;

@@ -590,0 +592,0 @@ }

{
"name": "@mitm/intl",
"version": "1.4.0",
"version": "1.5.0",
"dependencies": {

@@ -5,0 +5,0 @@ "@types/express": "*"

@@ -67,4 +67,4 @@ import type { Request } from 'express';

/**
* Gets the appropriate locale for a request, based on the X-App-Locale header.
* @todo Support HTTP Accept-Language, but keeping X-App-Locale as a first choice, for forcing the locale on a browser.
* Gets the appropriate locale for a request, based on the X-App-Language header.
* @todo Support HTTP Accept-Language, but keeping X-App-Language as a first choice for forcing the locale on a browser.
*

@@ -71,0 +71,0 @@ * @param registry The locales registry to get registered locales from.

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