1.0.1 • Published 4 years ago

subdivisions-of-egypt v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

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