Country Dictionary
Node.JS Country Descriptor
This modules allows you to grab information about any country (cities, languages spoken, phone index, ...etc).
Installation
$ npm install country-dictionary
Example Code
var _ = ;var countryDict = ; // Set Google Maps Geocoding API Key if you would like to find a country from an addresscountryDict; // Or:var CountryDict = ; var countryDict = GMapsApiKey: '<API Key>'; // get All countriesvar countries = countryDict; // get country by namevar country = countryDict; // Get 100 cities in a countrycountryDict // get country by Phone Indexvar country = countryDict; // get country from a given address (Uses Google Maps Geocoding API)countryDict; // get country's capitalvar capital = countryDict; // get country's spoken languages (Array)var languages = countryDict; // get countries by language spokencountryDict; // get countries by currency usedcountryDict; // get countries by contientcountryDict; // check if country is in EuropecountryDict;
Running Tests
Tests can be found in /test/api.test.js
$ npm test
License (MIT)
Copyright (c) 2016, Aymen Mouelhi.
Author: [Aymen Mouelhi]