country-code-to-flag

0.1.2 • Public • Published

country-code-to-flag

npm version

Install

$ npm i country-code-to-flag

Usage

The function countryCodeToFlag expect an ISO 3166-1 alpha-2 code

import countryCodeToFlag from "country-code-to-flag";
 
countryCodeToFlag("fr") // result: 🇫🇷
countryCodeToFlag("US") // result: 🇺🇸
countryCodeToFlag("USA") // throw an error 'the country code is invalid'
countryCodeToFlag('AA') // result: 🇦🇦

Readme

Keywords

Package Sidebar

Install

npm i country-code-to-flag

Weekly Downloads

115

Version

0.1.2

License

ISC

Unpacked Size

5.72 kB

Total Files

10

Last publish

Collaborators

  • jiefmo