knowbee / rwanda

🇷🇼This is a simple npm package that returns provinces, districts, sectors, villages and cells from Rwanda
https://www.npmjs.com/package/rwanda
MIT License
47 stars 20 forks source link
rwanda

rwanda

Build Status Maintainability npm npm Open Source Love Open Source Love

NPM

This is a simple npm package that returns provinces, districts, sectors, villages and cells found in Rwanda.

Rwanda is organized in four provinces in addition to the Kigali city, 30 Districts, 416 Sectors, 2148 Cells and 14 837 Villages.

Example

const { Provinces, Districts } = require('rwanda');

console.log(Provinces()); // [ 'East', 'Kigali', 'North', 'South', 'West' ]
console.log(Districts()); // [ 'Bugesera', 'Gatsibo', 'Kayonza', 'Kirehe',...]

And how to get districts of a given province

const { Districts } = require('rwanda');

console.log(Districts('kigali')); // [ 'Gasabo', 'Kicukiro', 'Nyarugenge' ]
console.log(Districts('Kigali', 'South')); // [ 'Gasabo', 'Kicukiro', 'Nyarugenge', 'Huye',.... ]

Methods

Usage

const { Provinces, Districts, Sectors, Cells, Villages } = require('rwanda');

All inputs are case-insensitive.

Provinces()

Returns array of country provinces.

['East', 'Kigali', 'North', 'South', 'West'];

Districts()

By default it returns an array of country districts, if no params (province) is given

Sectors()

By default it returns array of country sectors, if no params (province, district) are given

Cells()

By default it returns an array of all country cells.

Villages()

By default it returns an array of all country villages.

Install

npm install rwanda

or

yarn add rwanda

Contributors

Karl MUSINGO
Karl MUSINGO
Yves Iraguha<
Yves Iraguha
Abayo Luc
Abayo Luc
Olivier Esuka
Olivier Esuka
Igwaneza Bruce
Igwaneza Bruce

Contribution

License

MIT

Author

Igwaneza Bruce