emoji-country-flags
v1.0.3
Published
Convert country codes to emoji flags
Downloads
6,374
Readme
Emoji Country Flags
Convert country codes to emoji flags.
Install
npm install emoji-country-flags
Usage
import { codeToEmoji, flagToCountry } from 'emoji-country-flags';
const flag = codeToEmoji('GBR'); // '🇬🇧'
const country = flagToCountry('🇬🇧'); // Full country object
Country Example
{
"name": "Germany",
"codes": {
"alpha_2": "DE",
"alpha_3": "DEU"
},
"emoji": "🇩🇪"
}