subdivisions-of-egypt
v1.0.1
Published
Egypt is divided into 27 governorates and each has a capital and at least one city.
Downloads
4
Readme
Egyptian governorates and cities in Arabic and English
List of cities and towns in Egypt
Uses data from https://en.wikipedia.org/wiki/List_of_cities_and_towns_in_Egypt
Example
const { getGovernorates } = require("subdivisions-of-egypt")
console.log(getGovernorates()) // List of all governorates
console.log(getGovernoratesWithSubregions()) // List of all governorates with subregions
console.log(getGovernorate(GovernorateID)) // Specific governorate data
console.log(getSubregions(GovernorateID)) // Get all the cities in governorate
Example In Angular App
import { getGovernorates, getGovernoratesWithSubregions, getGovernorate, getSubregions} from 'subdivisions-of-egypt';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor(){
console.log(getGovernorates()) // List of all governorates
console.log(getGovernoratesWithSubregions()) // List of all governorates with subregions
console.log(getGovernorate(GovernorateID)) // Specific governorate data
console.log(getSubregions(GovernorateID)) // Get all the cities in governorate
}
}
Methods
Usage:
getGovernorates()
Returns all governorates
getGovernoratesWithSubregions()
Returns all governorates with subregions
getGovernorate(GovernorateID)
Specific governorate data
getSubregions(GovernorateID)
Get all the cities in governorate
Install
npm i subdivisions-of-egypt
License
MIT