2.0.11 • Published 3 years ago

kenyacounties v2.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

kenyacounties

Kenya counties and sub-counties as json objects

Installation

npm install --save kenyacounties

Usage

const KenyaCounties = require ('kenyacounties')

Getting full kenya counties data

let counties = KenyaCounties.getAll()
console.log(counties)

Get a county's metadata using county's code

Note: the code should be an intenger ranging from 1 - 47

let Nairobi = KenyaCounties.getCountyByCode(47);

Get a county's sub-counties based on code or county name

Note: the code should be an intenger ranging from 1 - 47, while the county name should be a string irregardless of cases.

// Name = Nairobi, code = 47
let obj = KenyaCounties.getSubCountiesByCountyCode(47) // returns all the subcounties within Nairobi
let obj = KenyaCounties.getSubCountiesByCountyName("Nairobi") // returns all the subcounties within Nairobi
2.0.11

3 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago