Package Exports
- barangay
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (barangay) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
barangay
A simple list of barangays in the Philippines ordered into city/towns, provinces, then regions.
Install
npm install --save barangayUsage
import barangay from 'barangay';
// list all regions
const regions = barangay();
// use one of the regions to get the list of provinces
const NCR_PROVINCES = barangay('NATIONAL CAPITAL REGION');
// use one of the provinces to get list of towns and cities under that province
const METROMANILA_TOWNSCITIES = barangay('NATIONAL CAPITAL REGION', 'METRO MANILA');
// use the region, province, and town/city to get the list of barangays
const CITYOFMANILA_BARANGAYS = barangay('NATIONAL CAPITAL REGION', 'METRO MANILA', 'CITY OF MANILA');
// the values are case sensitive
// the function will throw if either the value is invalid or does not exist
// you can also get all the data
const allData = barangay.dump;