UNPKG

psgc-areas

Version:

Provides the full Philippine Standard Geographic Code (PSGC) dataset in JSON with multiple formats (hierarchy, flat list of all areas, regions, provinces, cities, municipalities, municipal districts, and barangays).

29 lines (27 loc) 775 B
import { readJSON } from "./utils.js"; export const PSGCResource = { getAll: async function() { return await readJSON("all"); }, getAreas: async function() { return await readJSON("areas"); }, getRegions: async function() { return await readJSON("regions"); }, getProvinces: async function() { return await readJSON("provinces"); }, getCities: async function() { return await readJSON("cities"); }, getMunicipalities: async function() { return await readJSON("municipalities"); }, getMunicipalDistricts: async function() { return await readJSON("municipalDistricts"); }, getBarangays: async function() { return await readJSON("barangays"); }, };