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

@os-team/i18next-tld-language-detector

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@os-team/i18next-tld-language-detector - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

22

dist/esm/index.js

@@ -1,13 +0,22 @@

const tldLocaleMap = {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.detectLanguageByHost = void 0;
var tldLocaleMap = {
com: 'en',
ru: 'ru'
};
export const detectLanguageByHost = host => {
const tld = host.slice(host.lastIndexOf('.') + 1);
var detectLanguageByHost = host => {
var tld = host.slice(host.lastIndexOf('.') + 1);
return tldLocaleMap[tld];
};
const tldLanguageDetector = {
exports.detectLanguageByHost = detectLanguageByHost;
var tldLanguageDetector = {
name: 'tld',
lookup: req => {
const host = typeof window === 'undefined' ? req.get('host') : window.location.hostname;
var host = typeof window === 'undefined' ? req.get('host') : window.location.hostname;
if (!host) return undefined;

@@ -17,3 +26,4 @@ return detectLanguageByHost(host);

};
export default tldLanguageDetector;
var _default = tldLanguageDetector;
exports.default = _default;
//# sourceMappingURL=index.js.map
{
"name": "@os-team/i18next-tld-language-detector",
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",

@@ -36,3 +36,3 @@ "repository": "git@gitlab.com:os-team/libs/utils.git",

},
"gitHead": "07e4b2ac448f33eb1ab9f2a19e9f8896fdf7356c"
"gitHead": "13c1eb95a749a3eff99931c905b7436388091b34"
}

Sorry, the diff of this file is not supported yet

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