2.0.11 • Published 4 years ago

kenyacounties v2.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
4 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

4 years ago

2.0.10

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago