mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-25 13:35:32 +02:00
🚧 add country code flag emoji function
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
export function countryCodeToFlagEmoji(isoAlpha2: string) {
|
||||||
|
const codePoints = [...isoAlpha2.toUpperCase()].map(
|
||||||
|
(char) => 0x1f1e6 + char.charCodeAt(0) - 65
|
||||||
|
);
|
||||||
|
return String.fromCodePoint(...codePoints);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user