Files
gridpilot.gg/apps/website/lib/utilities/country.ts

8 lines
276 B
TypeScript

export function getCountryFlag(countryCode: string): string {
const code = countryCode.toUpperCase();
if (code.length === 2) {
const codePoints = [...code].map(char => 127397 + char.charCodeAt(0));
return String.fromCodePoint(...codePoints);
}
return '🏁';
}