README
country-city-location
A very usefull package for getting country name, country code, longitude, latitude. Get all cities of a country by country code.
country-city-location
?
Why should you use - Easy to use
- No api request
- Offline use
Getting Started
Installation
npm install --save country-city-location
Usage
You need to import countries first.
import {
countries,
cities,
getCitiesByCountryCode,
} from "country-city-location";
//or
const {
countries,
cities,
getCitiesByCountryCode,
} = require("country-city-location");
countries
Get all country name and country code in array
console.log(countries)
//response example
[
{
"Name": "United States of America",
"Alpha2Code": "US",
"Alpha3Code": "USA",
"NativeName": "United States",
"Region": "Americas",
"SubRegion": "Northern America",
"Latitude": "38",
"Longitude": "-97",
"Area": 9629091,
"NumericCode": 840,
"NativeLanguage": "eng",
"CurrencyCode": "USD",
"CurrencyName": "United States dollar",
"CurrencySymbol": "