zipcodes-ph
Philippines zip code directory.
Installation
Install via npm:
$ npm install --save zipcodes-ph
Browser builds are also available inside the build
directory or in unpkg.com.
Usage
NodeJS:
const zipcodes = ; zipcodes; // 'Cebu City'zipcodes; // 6000
Browser:
// global variable `zipcodesPH` is exposed zipcodesPH; // 'Cebu City'zipcodesPH; // 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.- possible return values:
- Number if zip code for the location is found.
- null if zip code for the location is not found.
License
MIT License