p-mohamed-elsawy / subdivisions-of-egypt

Egyptian governorates and cities in Arabic and English

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Egyptian governorates and cities in Arabic and English

License:MIT License


Languages

Language:JavaScript 100.0%