Need private packages and team management tools?Check out npm Teams »

postal-codes

1.0.869 • Public • Published

postal-codes

NPM version Downloads

Maps postal codes to polygons.

Usage

Install the library with npm install postal-codes

var PostalCodes = require('postal-codes');
 
var postalCodes = new PostalCodes();
 
// Get supported countries
postalCodes.supportedCountries().then(function(value) {
  value.countryCodes; //->  Array of ISO 3166-1 alpha-2 country codes
});
 
// Get some postal code
postalCodes.area({
  countryCode: "US",
  postalCode: "90210"
}).then(function(value) {
  value.countryCode; //-> "US"
  value.id;          //-> "90210"
  value.polygons;    //-> Array of polygons that represent this postal code
});

Reporting Issues

Please use the issue tracker to report issues related to this library.

License

This library uses the Apache License, version 2.0.

Install

npm i postal-codes

DownloadsWeekly Downloads

5,232

Version

1.0.869

License

Apache-2.0

Unpacked Size

21.6 kB

Total Files

10

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar