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

i18next-cli-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

i18next-cli-language-detector - npm Package Compare versions

Comparing version 0.0.1-rc3 to 0.0.1-rc4

3

dist/index.d.ts

@@ -14,3 +14,2 @@ import { Services, InitOptions } from "i18next";

}
declare const _default: I18nextCLILanguageDetector;
export default _default;
export default I18nextCLILanguageDetector;

@@ -17,5 +17,5 @@ "use strict";

var formattedLangauge = this.formatShellLocale(shellLocale);
if (!formattedLangauge || !this.checkIfWhitelisted(formattedLangauge)) {
return this.getFallbackLng();
}
// if (!formattedLangauge || !this.checkIfWhitelisted(formattedLangauge)) {
// return this.getFallbackLng();
// }
return formattedLangauge;

@@ -34,3 +34,3 @@ };

return;
return this.services.languageUtils.formatLanguageCode(splittedLC[0]);
return this.services.languageUtils.formatLanguageCode(splittedLC[0].replace("_", "-"));
};

@@ -55,2 +55,2 @@ I18nextCLILanguageDetector.prototype.checkIfWhitelisted = function (language) {

}());
exports.default = new I18nextCLILanguageDetector();
exports.default = I18nextCLILanguageDetector;
{
"name": "i18next-cli-language-detector",
"description": "i18next language detector module for CLI",
"version": "0.0.1-rc3",
"version": "0.0.1-rc4",
"author": "Ryo Igarashi <n33t5hin@gmail.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -25,5 +25,5 @@ import { Services, InitOptions } from "i18next";

if (!formattedLangauge || !this.checkIfWhitelisted(formattedLangauge)) {
return this.getFallbackLng();
}
// if (!formattedLangauge || !this.checkIfWhitelisted(formattedLangauge)) {
// return this.getFallbackLng();
// }

@@ -42,4 +42,5 @@ return formattedLangauge;

if (splittedLC.length < 0) return;
return this.services.languageUtils.formatLanguageCode(splittedLC[0]);
return this.services.languageUtils.formatLanguageCode(
splittedLC[0].replace("_", "-")
);
}

@@ -71,2 +72,2 @@

export default new I18nextCLILanguageDetector();
export default I18nextCLILanguageDetector;
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