https://github.com/benaubin/tiny-flag
π π³οΈβπ Work with emoji flags in a tiny footprint
https://github.com/benaubin/tiny-flag
Last synced: 3 months ago
JSON representation
π π³οΈβπ Work with emoji flags in a tiny footprint
- Host: GitHub
- URL: https://github.com/benaubin/tiny-flag
- Owner: benaubin
- License: mit
- Created: 2020-06-29T02:31:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T16:22:25.000Z (almost 4 years ago)
- Last Synced: 2025-02-09T09:44:07.803Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 16.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
π tiny-flag π
> Work with emoji flags in a tiny (317b minified) footprint
## Install
```sh
npm i --save tiny-flag
``````sh
yarn add tiny-flag
```## Usage
```js
import countryCodeToFlag from "tiny-flag";countryCodeToFlag("US"); //=> 'πΊπΈ'
```Works great with `if-emoji` for progressive fallbacks: [Demo](https://codesandbox.io/s/country-flags-wz5g7?file=/src/App.js).
## Author
π€ **Ben Aubin**
- Website: benaubin.com
- Twitter: [@BenAubin\_](https://twitter.com/BenAubin_)
- Github: [@benaubin](https://github.com/benaubin)## Show your support
Give a βοΈ if this project helped you!