1.0.3 • Published 3 years ago

emoji-country-flags v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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": "🇩🇪"
}