Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/wojtekmaj/country-code-to-flag-emoji. A function that returns a flag emoji given IETF language tag.
Something went wrong. Try again.
Files
- TypeScript 100%
README.md
Country-Code-to-Flag-Emoji #
A function that returns a flag emoji given ISO 3166-1 alpha-2 code or IETF language tag.
tl;dr #
- Install by executing
npm install country-code-to-flag-emojioryarn add country-code-to-flag-emoji. - Import by adding
import countryCodeToFlagEmoji from 'country-code-to-flag-emoji'. - Do stuff with it!
countryCodeToFlagEmoji('PL'); // 🇵🇱
Accepted formats #
- IETF language tag, e.g.
'en-US'or'pl' - ISO 3166-1 alpha-2 code, e.g.
'US','PL', or'GB-SCT'
Examples #
countryCodeToFlagEmoji('pl'); // '🇵🇱'
countryCodeToFlagEmoji('GB-SCT'); // '🏴'
License #
The MIT License.
Author #
|
|
Wojciech Maj |