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 [email protected] https://wojtekmaj.pl |