Small function to return an emoji flag corresponding to a country code.
flag('DK') // returns '🇩🇰'const flag = x => String.fromCodePoint(
x.toUpperCase()[0].codePointAt(0) + 127397,
x.toUpperCase()[1].codePointAt(0) + 127397
)Small function to return an emoji flag corresponding to a country code.
flag('DK') // returns '🇩🇰'const flag = x => String.fromCodePoint(
x.toUpperCase()[0].codePointAt(0) + 127397,
x.toUpperCase()[1].codePointAt(0) + 127397
)| const flag = x => String.fromCodePoint( | |
| x.toUpperCase()[0].codePointAt(0) + 127397, | |
| x.toUpperCase()[1].codePointAt(0) + 127397 | |
| ) |