From 606cd547bdf91618cd63052a55a6a048e99e688f Mon Sep 17 00:00:00 2001 From: Chuma McPhoy Date: Tue, 2 Jul 2024 16:05:34 +0200 Subject: [PATCH] fix: better commenting --- constants/languages.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/constants/languages.ts b/constants/languages.ts index 40f3a1101..93f407d7c 100644 --- a/constants/languages.ts +++ b/constants/languages.ts @@ -73,14 +73,18 @@ export function findLang(pathname: string) { ) } -// Helper function to convert API's (e.g. the Hotel endpoint) capitalized values to Lang enum. +/** + * Helper function to convert API's (e.g. the Hotel endpoint) capitalized values to Lang enum. + */ export function fromUppercaseToLangEnum(lang: string): Lang | undefined { const lowerCaseLang = lang.charAt(0).toLowerCase() + lang.slice(1) return Object.values(Lang).find((l) => l === lowerCaseLang) } -// Helper function to convert Lang enum to uppercase -// Needed for certtain API (e.g. the Hotel endpoint). +/** + * Helper function to convert Lang enum to uppercase + * Needed for certtain API (e.g. the Hotel endpoint). + */ export const toUppercaseLang = (lang: Lang): string => { switch (lang) { case Lang.en: