This package provide all country list with their flag emoji and dial number code.
npm install country-list-with-dial-code-and-flag
import CountryList from 'country-list-with-dial-code-and-flag'
Function | Description |
---|---|
getList |
get all available countries |
searchFlag |
filter countries with keyword Eg. searchFlag('keywordToSearch') |
findFlag |
get specific country by 2 character country code Eg. findFlagByDialCode('MM') |
findFlagsByDialCode |
get list of countries by dial code Eg. findFlagByDialCode('+95') |
findFlagByDialCode |
get country by dial code Eg. findFlagByDialCode('+95') |
[
{ "name": "Afghanistan", "dial_code": "+93", "code": "AF", "flag": "🇦🇫" },
{ "name": "Myanmar", "dial_code": "+95", "code": "MM", "flag": "🇲🇲" }
]
Want to contribute? Great! Fork the repo and create PR to us.