Skip to content

michaelolof/country-flags-dial-codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Countries Flag Dial Codes

A Utility library for mapping countries, dial codes and their flags in SVG.

Installation

$ npm install --save country-flags-dial-code

API

getCountryListMap()

/**
 * Returns a dictionary of countries with their flags, name and codes (E.g)
 * {
 *    "AC": {
 *      "flag": "<svg xmlns='http:/>..."
 *      "code": "AC",
 *      "country": "Ascension Island",
 *      "dialCode": "+247"
 *    }
 *    ...
 * }

getCountryDialCode(countryCode)

/**
 * Returns the dial code for a given country (E.g)
 * "+247"

getCountryName(countryCode)

/**
 * Returns the dial code for a given country (E.g)
 * "Ascension Island"

getCountryFlag(countryCode)

/**
 * Returns the dial code for a given country (E.g)
 * "<svg xmlns='http:/>..."

About

A Utility library for mapping countries, dial codes and their flags

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published