Skip to content
forked from pcofilada/psgc

Provides PSGC (Philippine Standard Geographic Code) data.

Notifications You must be signed in to change notification settings

ryanjanborja/psgc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Philippine Standard Geographic Code (PSGC)

Build Status

Provides PSGC (Philippine Standard Geographic Code) data for your application.

Installation

PSGC is available via npm.

$ npm install --save psgc

Or you can use yarn.

$ yarn add psgc

Usage

Import psgc into your app.

import { regions, provinces, municipalities, barangays } from 'psgc';

Use the methods all, find, or filter to get the data you need.

regions.all()                         // To get all regions
regions.find('Ilocos Region')         // To get a specific region, pass the exact region name
regions.filter('loco')                // To get a list of all regions with names that contain the argument; case-insensitive

provinces.all()
provinces.find('La Union')
regions.filter('la u')

municipalities.all()
municipalities.find('Agoo')
municipalities.filter('agoo')


barangays.all()
barangays.find('San Nicolas East')
barangays.filter('san nico')

TODO

  • Add additional information about regions, provinces, municipalities and barangays
  • Add test

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits

License

The package is available as open source under the terms of the MIT License.

About

Provides PSGC (Philippine Standard Geographic Code) data.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%