RavindraChherke / country-list-with-dial-code-and-flag

Country Flag with Dial Number Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Country list with dial code and flag

npm version ts ts countributers

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

kofi

About

Country Flag with Dial Number Code


Languages

Language:TypeScript 99.4%Language:JavaScript 0.6%