npm install udistricts
This package returns a promise. Therefore to access the district names, you will have to:
-
require the package.
-
you can destructure the path from the package i.e
const { getDistricts } = require('udistricts')
getDistricts.then(districts => districts.map(d => console.log(d))).catch(error => console.log(error))
Pull Requests are welcome. For major changes, please open an issue first to discuss what you would like to change
Please make sure to update tests as appropriate
Ronald Mutebi
Have fun with it.