A function that returns a flag emoji given IETF language tag.
- Install by executing
npm install country-code-to-flag-emoji
oryarn add country-code-to-flag-emoji
. - Import by adding
import countryCodeToFlagEmoji from 'country-code-to-flag-emoji'
. - Do stuff with it!
countryCodeToFlagEmoji('pl'); // 🇵🇱
- IETF language tag, e.g.
'en-US'
or'US'
countryCodeToFlagEmoji('pl'); // '🇵🇱'
countryCodeToFlagEmoji('hu-HU'); // 'ðŸ‡ðŸ‡º'
The MIT License.
Wojciech Maj |