From 9a7504086af8c99bc4c443dd8143b1c47180deeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=BDdila?= Date: Wed, 6 Nov 2024 12:51:40 +0100 Subject: [PATCH] reverted touched formatting --- src/language.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/language.ts b/src/language.ts index 21c8d9b..e70e6b2 100644 --- a/src/language.ts +++ b/src/language.ts @@ -1021,7 +1021,7 @@ export const Language = { */ export function getLanguageInfoFromKey( languageKey: string, - languageDictionnary: { [k: string]: LanguageInfo } = Language + languageDictionnary: { [k: string]: LanguageInfo } = Language, ): LanguageInfo | null { if (languageKey in languageDictionnary) { return languageKey[languageKey]; @@ -1036,7 +1036,7 @@ export function getLanguageInfoFromKey( */ export function getLanguageInfoFromCode( languageCode: string, - languageDictionnary: { [k: string]: LanguageInfo } = Language + languageDictionnary: { [k: string]: LanguageInfo } = Language, ): LanguageInfo | null { for (const lang of Object.values(languageDictionnary)) { if (lang.code === languageCode) { @@ -1054,7 +1054,7 @@ export function getLanguageInfoFromCode( */ export function getLanguageInfoFromFlag( languageFlag: string, - languageDictionnary: { [k: string]: LanguageInfo } = Language + languageDictionnary: { [k: string]: LanguageInfo } = Language, ): LanguageInfo | null { for (const lang of Object.values(languageDictionnary)) { if (lang.flag === languageFlag) { @@ -1075,7 +1075,7 @@ export function getAutoLanguage(): LanguageInfo { } const canditatelangs = Array.from( - new Set(navigator.languages.map((l) => l.split("-")[0])) + new Set(navigator.languages.map((l) => l.split("-")[0])), ) .map((code) => getLanguageInfoFromCode(code)) .filter((li) => li); @@ -1107,7 +1107,7 @@ export function isLanguageInfo(obj: unknown): obj is LanguageInfo { */ export function toLanguageInfo( lang: LanguageInfo | string, - languageDictionnary: { [k: string]: LanguageInfo } = Language + languageDictionnary: { [k: string]: LanguageInfo } = Language, ): LanguageInfo | null { // Could be directly an object of type LanguageInfo if (isLanguageInfo(lang)) { @@ -1136,7 +1136,7 @@ export function toLanguageInfo( export function areSameLanguages( langA: string | LanguageInfo, langB: string | LanguageInfo, - languageDictionnary: { [k: string]: LanguageInfo } = Language + languageDictionnary: { [k: string]: LanguageInfo } = Language, ): boolean { const langAObj = toLanguageInfo(langA, languageDictionnary); const langBObj = toLanguageInfo(langB, languageDictionnary);