opencollective / country-currency-emoji-flags

Returns Country Flag Emojis Given the Country or Currency Codes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

country-currency-emoji-flags

This small package helps to obtain emojis based on the currency code (ISO 4217) or country code (ISO 3166-1 alpha-2).

Install

npm install --save country-currency-emoji-flags

Usage

import {
  getEmojiByCountryCode,
  getEmojiByCurrencyCode,
  countryData,
  currencyData,
} from "country-currency-emoji-flags";

// Currency lookup
emojiFlags.getEmojiByCurrencyCode("CAD");
// => "πŸ‡¨πŸ‡¦"

// Country lookup
emojiFlags.getEmojiByCountryCode("CA");
// => "πŸ‡¨πŸ‡¦"

// entire currency code set
emojiFlags.currencyData;

// entire country code set
emojiFlags.countryData;

About

Returns Country Flag Emojis Given the Country or Currency Codes

License:MIT License


Languages

Language:JavaScript 100.0%