Skip to content

Instantly share code, notes, and snippets.

@fa7ad
Created October 12, 2019 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fa7ad/d884fc7b093be6eb69a729196dfb5452 to your computer and use it in GitHub Desktop.
Save fa7ad/d884fc7b093be6eb69a729196dfb5452 to your computer and use it in GitHub Desktop.
function countryToEmoji (code) {
code = code.toUpperCase()
const [e1, e2] = [code.codePointAt(0) + 127397, code.codePointAt(1) + 127397]
return String.fromCodePoint(e1) + String.fromCodePoint(e2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment