refactor: move functions

This commit is contained in:
Maël Gangloff
2024-08-22 01:44:50 +02:00
parent 7ece681d73
commit 5ae0b836a5
25 changed files with 244 additions and 215 deletions

View File

@@ -0,0 +1,5 @@
export const getCountryCode = (tld: string): string => {
const exceptions = {uk: 'gb', su: 'ru', tp: 'tl'}
if (tld in exceptions) return exceptions[tld as keyof typeof exceptions]
return tld.toUpperCase()
}