https://github.com/mohammad-prb/provinces-and-cities-npm
Package of countries provinces and cities (NPM)
https://github.com/mohammad-prb/provinces-and-cities-npm
cities city germany iran npm package province provinces
Last synced: 6 months ago
JSON representation
Package of countries provinces and cities (NPM)
- Host: GitHub
- URL: https://github.com/mohammad-prb/provinces-and-cities-npm
- Owner: mohammad-prb
- License: mit
- Created: 2025-01-01T12:36:52.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-01-20T17:09:39.000Z (9 months ago)
- Last Synced: 2025-04-10T16:16:33.416Z (6 months ago)
- Topics: cities, city, germany, iran, npm, package, province, provinces
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/provinces-and-cities
- Size: 18.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Countries Provinces and Cities
This project provides data for provinces/states and cities of various countries. Currently, the following countries are included:
- **Iran**: Detailed list of provinces and cities.
- **Germany**: Comprehensive list of federal states (Bundesländer) and their cities.If you use languages other than JavaScript and need these lists, you can access the **JSON** and **MySQL** Information through this [repository](https://github.com/mohammad-prb/provinces-and-cities).
## Install
```
npm i provinces-and-cities
```## How to Use
```javascript
import { Iran } from 'provinces-and-cities'Iran.main // all provinces and main cities
Iran.all // all provinces and all cities
```### Examlpe of data
```javascript
Iran.main[7] = {
"id": 8,
"name": "تهران",
"tel_prefix": "021",
"cities": [
"اسلامشهر",
"بومهن",
"پاكدشت",
"تهران",
"چهاردانگه",
"دماوند",
"رودهن",
"ري",
"شريف آباد",
"شهر رباط كريم",
"شهر شهريار",
"فشم",
"فيروزكوه",
"قدس",
"كهريزك",
"لواسان بزرگ",
"ملارد",
"ورامين"
]
}
```## Future Plans
The project is designed to be scalable, and we plan to add data for other countries in the future. If you have suggestions for specific countries, feel free to contribute or create an issue.## Contributions
We welcome contributions to expand this project. If you'd like to add data for a new country or improve existing data, please create a pull request.## Support
If this project was helpful, please consider giving it a **star**. Your support helps us grow!