0.0.5 • Published 5 years ago

murwanda v0.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

murwanda

Build Status npm Dependency Status npm Open Source Love Open Source Love

murwanda is an alternative to rwanda, with this package you get access to place codes for all locations(provinces,districs,sectors,cells,villages) from Rwanda

Install

npm install murwanda

or

yarn add murwanda

Example

const { PlaceCodesByProvince, PlaceCodesByCode } = require("murwanda");

console.log(PlaceCodesByProvince("South"));
console.log(PlaceCodesByCode("102130307")) // 102130307 : village code
// [
// {
//     province_code: '1',
//     province_name: 'Kigali City',
//     district_code: '102',
//     district_name: 'Gasabo',
//     sector_code: '010213',
//     sector_name: 'Remera',
//     cell_code: '1021303',
//     cell_name: 'Rukiri I',
//     village_code: '102130307',
//     village_name: 'Urumuri'
//   }
// ]

Usage

const { PlaceCodesByProvince, PlaceCodesByDistrict, PlaceCodesBySector, PlaceCodesByCell, PlaceCodesByVillage, PlaceCodesByCode } = require("murwanda");

All inputs are case-insensitive.

Methods

PlaceCodesByProvince(province)

Returns array of all places(province, districts, sectors, cells, villages) and their respective codes from the given province.

PlaceCodesByDistrict(province, district)

Returns array of all places(province, district, sectors, cells, villages) and their respective codes from the given district.

PlaceCodesBySector(province, district, sector)

Returns array of all places(province, district, sector, cells, villages) and their respective codes.

PlaceCodesByCell(province, district, sector, cell)

Returns array of all places(province, district, sector, cell, villages) and their respective codes.

PlaceCodesByVillage(province, district, sector, cell, village)

Returns array of all places(province, district, sector, cell, village) and their respective codes.

PlaceCodesByCode(code)

Returns array of all places(province, district, sector, cell, village) and their respective codes.

Contribution

License

MIT

Author

Igwaneza Bruce