Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Latest commit

 

History

History
21 lines (14 loc) · 855 Bytes

File metadata and controls

21 lines (14 loc) · 855 Bytes

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