Package Exports
- zipcodes-ph
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 (zipcodes-ph) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
zipcodes-ph
Philippines zip code directory.
Installation
Install via npm:
$ npm install --save zipcodes-phBrowser builds are also available inside the build directory or in unpkg.com.
Usage
NodeJS:
const zipcodes = require('zipcodes-ph');
zipcodes.find(6000); // 'Cebu City'
zipcodes.reverse('Cebu City'); // 6000Browser:
<script src="path/to/zipcodes-ph/build/index.umd.min.js"></script>// global variable `zipcodesPH` is exposed
zipcodesPH.find(6000); // 'Cebu City'
zipcodesPH.reverse('Cebu City'); // 6000API
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