Skip to content

Latest commit

 

History

History
84 lines (61 loc) · 1.53 KB

README.md

File metadata and controls

84 lines (61 loc) · 1.53 KB

Morocco Cities

Table Of Content

About

A list of all cities in morocco with it region

Installation

yarn add morocco-cities

Usage

For Cities

const { cities } = require("morocco-cities");

it's will return an array of objects like this

[
  {
    "id": 102,
    "region_number": 7,
    "name": "Marrakech",
    "region_name": "Marrakech-Safi",
    "uniq_id": "city_80f346f3-7177-44bd-a79c-5a9235d65ea1"
  }
]

Note: the uniq_id property is not constant, that mean it's will changing on every version

For regions

const { regions } = require("morocco-cities");

it's will return an array of objects like this

[
  {
    "id": 12,
    "cities_count": 2,
    "cities_list": ["Awsard", "Oued-Eddahab"],
    "name": "Dakhla-Oued Ed Dahab"
  }
]

For cities count & regions count

const { citisCount, regionsCount } = require("morocco-cities");

Changelog

Read From Here

Thanks for

I want to say Thanks for Alaouy because i'm using his repository data

License

MIT