List of cities and towns in Egypt
Uses data from https://en.wikipedia.org/wiki/List_of_cities_and_towns_in_Egypt
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
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
}
}
Usage:
Returns all governorates
Returns all governorates with subregions
Specific governorate data
Get all the cities in governorate
npm i subdivisions-of-egypt
MIT