0.0.5 • Published 8 years ago

postal-code v0.0.5

Weekly downloads
49
License
MIT
Repository
github
Last release
8 years ago

German Postal Codes

Travis Build npm

Install

$ npm install postal-code --save

Usage

'use strict';
const postal = require('postal-code');

postal.get('13347'); // returns {regions: ['Berlin'], districts: ['Wedding', 'Gesundbrunnen']}; OR undefined in case nothing was found
postal.getRegions('13347'); // returns ['Berlin'] / Region OR empty Array
postal.getDistricts('13347'); // returns ['Wedding', 'Gesundbrunnen'] or empty Array
postal.getPostalCodesByDistrict('Wedding'); // returns Array of Postal codes or Empty Array
postal.getPostalCodesByRegion('Berlin'); // returns Array of postal codes or Empty array