Philippines zip code directory this is an updated fork of https://github.com/arnellebalane/zipcodes-ph.git
npm install zipcodes-ph2bash
$ npm install --save zipcodes-ph
`
Browser builds are also available inside the build directory or in unpkg.com.
Usage
NodeJS:
`js
const zipcodes = require('zipcodes-ph');
zipcodes.find(6000); // 'Cebu City'
zipcodes.reverse('Cebu City'); // 6000
`
Browser:
`html
`
`js
// global variable zipcodesPH is exposed
zipcodesPH.find(6000); // 'Cebu City'
zipcodesPH.reverse('Cebu City'); // 6000
`
API
- find(zipcode)
- zipcode _(Number|String)_: The zip code that will be resolved into a location name.
- possible return values:
- _String_ if one location with the zip code is found.
- _Array_ if multiple locaitons with the zip code are found.
- _null_ if no locations with the zip code are found.
- reverse(location)
- location` _(String)_: The name of the location that will be resolved into a zip code.