Usage
import CountryList from 'country-list-with-dial-code-and-flag'
CountryList.getAll()
// Response => Array<Country>
CountryList.findOneByCountryCode('MM')
// Response => Country
CountryList.findOneByDialCode('+95')
// Response => Country
CountryList.findByDialCode('+95')
// Response => Array<Country>
CountryList.findByKeyword('united')
// Response => Array<Country>import CountryFlagSvg from 'country-list-with-dial-code-and-flag/dist/flag-svg'
const myanmar = CountryList.findOneByCountryCode('mm')
if (myanmar) {
const flagSvg = CountryFlagSvg[myanmar.code]
console.log(flagSvg) // This will return svg string
}Example response
Available Functions
Function
Description
Country
Function / Attribute
Description
Last updated