Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

🎌 tiny-flag 🎌




License: MIT

> 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!