Package Exports
- geocode-to-pincode
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 (geocode-to-pincode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
geocode-to-pincode
A small package to extract out pincode for any location using geocodes (latitudes and longitudes)
Installation
npm i geocode-to-pincode
Usage
const geocodeToPincode = require("geocode-to-pincode");
geocodeToPincode({lat: 28.591, lng: 77.319, key: 'you-google-maps-api-key'})
.then(response => console.log(response.pincode)) // prints '201301'
.catch(error => console.log(error)) // prints error object as is
// supply key either in options or as an environment variable as shown below
// GOOGLE_MAPS_API_KEY=your-actual-google-apis-key
// if for some reason pincode doesn't exist for that location
// then it prints 'NotFound' without error, this case will mostly
// not be there if the location is valid, meaning, location has a
// pincode associated with it
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.