Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wojtekmaj/country-code-to-flag-emoji
A function that returns a flag emoji given IETF language tag.
https://github.com/wojtekmaj/country-code-to-flag-emoji
emoji flags
Last synced: 1 day ago
JSON representation
A function that returns a flag emoji given IETF language tag.
- Host: GitHub
- URL: https://github.com/wojtekmaj/country-code-to-flag-emoji
- Owner: wojtekmaj
- License: mit
- Created: 2019-07-28T12:20:55.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-27T07:15:55.000Z (3 months ago)
- Last Synced: 2024-10-14T11:18:48.114Z (2 months ago)
- Topics: emoji, flags
- Language: TypeScript
- Homepage:
- Size: 3.74 MB
- Stars: 57
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![npm](https://img.shields.io/npm/v/country-code-to-flag-emoji.svg)](https://www.npmjs.com/package/country-code-to-flag-emoji) ![downloads](https://img.shields.io/npm/dt/country-code-to-flag-emoji.svg) [![CI](https://github.com/wojtekmaj/country-code-to-flag-emoji/actions/workflows/ci.yml/badge.svg)](https://github.com/wojtekmaj/country-code-to-flag-emoji/actions)
# Country-Code-to-Flag-Emoji
A function that returns a flag emoji given [IETF language tag].
## tl;dr
- Install by executing `npm install country-code-to-flag-emoji` or `yarn add country-code-to-flag-emoji`.
- Import by adding `import countryCodeToFlagEmoji from 'country-code-to-flag-emoji'`.
- Do stuff with it!
```ts
countryCodeToFlagEmoji('pl'); // 🇵🇱
```## Accepted formats
- [IETF language tag], e.g. `'en-US'` or `'US'`
## Examples
```ts
countryCodeToFlagEmoji('pl'); // '🇵🇱'countryCodeToFlagEmoji('hu-HU'); // 'ðŸ‡ðŸ‡º'
```## License
The MIT License.
## Author
[ietf language tag]: https://en.wikipedia.org/wiki/IETF_language_tag