kenya-locations
Version:
A comprehensive and intuitive TypeScript package for working with Kenyan administrative divisions (counties, sub-counties, constituencies, and wards)
39 lines (38 loc) • 978 B
JavaScript
import { a as o, l as s } from "./area-DZRgJy_F.js";
import { c } from "./counties-CIvO8NBl.js";
import { b as a, a as r } from "./maps-Bqmru5Ek.js";
const n = a(o, (e) => e.name.toLowerCase()), u = r(o, (e) => e.name.toLowerCase()), i = a(s, (e) => e.name.toLowerCase()), m = a(c, (e) => e.name.toLowerCase()), g = r(o, (e) => e.locality), l = r(o, (e) => e.county);
function L() {
return o;
}
function C(e) {
return n.get(e.toLowerCase());
}
function w(e) {
return g.get(e) ?? [];
}
function A(e) {
return l.get(e) ?? [];
}
function M(e) {
const t = n.get(e.toLowerCase());
if (t)
return m.get(t.county.toLowerCase());
}
function N(e) {
const t = n.get(e.toLowerCase());
if (t)
return i.get(t.locality.toLowerCase());
}
function d(e) {
return u.get(e.toLowerCase()) ?? [];
}
export {
C as getAreaByName,
L as getAreas,
d as getAreasByName,
A as getAreasInCounty,
w as getAreasInLocality,
M as getCountyOfArea,
N as getLocalityOfArea
};