2.0.11 • Published 2 years ago

kenyacounties v2.0.11

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

2 years ago

2.0.10

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago