Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benaubin/tiny-flag
π π³οΈβπ Work with emoji flags in a tiny footprint
https://github.com/benaubin/tiny-flag
Last synced: 17 days 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 (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T16:22:25.000Z (over 3 years ago)
- Last Synced: 2024-08-08T19:14:47.781Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 16.6 KB
- Stars: 2
- 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!