Small, lightweight utility to get, match and validate german postal codes with districts. It has no dependencies, so it can run both in node.js server environment and in browsers with e.g. Angular.
It's intention is to provide support for address forms, especially together with searchable select-fields. Therefre it only returns just necessary raw values in an array, rather than an object with all informations about a district.
npm i german-zip-codes
If there is no match, an empty array will be returned. There are no error handling implemented yet.
const zipCode = require('german-zip-codes')
You can report issues or submit ideas for improvements to the github repo.
MIT. Feel free to do whatever you want to, credits are welcome. Data based on German-Zip-Codes.csv" from jbspeakr.