Country list with dial code and flag
This package provide all country list with their flag emoji and dial number code.
Installation
npm install country-list-with-dial-code-and-flag
import CountryList from 'country-list-with-dial-code-and-flag'
Available Functions
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') |
Example response
[
{ "name": "Afghanistan", "dial_code": "+93", "code": "AF", "flag": "🇦🇫" },
{ "name": "Myanmar", "dial_code": "+95", "code": "MM", "flag": "🇲🇲" }
]
Development
Want to contribute? Great!
Fork the repo and create PR to us.
Buy me Coffee