Created
March 15, 2022 08:47
-
-
Save kilinkis/f8a20932edb85e4a85157c0491290f8a to your computer and use it in GitHub Desktop.
Country code to flag emoji
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getFlagEmoji = (countryCode) => | |
String.fromCodePoint(...[...countryCode.toUpperCase()].map((x) => 0x1f1a5 + x.charCodeAt(0))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment