stonymahony / german-zip-codes

Small, lightweight utility to get, match and validate german postal codes with districts.
MIT License
3 stars 0 forks source link

german-zip-codes

Build Status

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.

Intention

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.

Installation

npm i german-zip-codes

Usage

If there is no match, an empty array will be returned. There are no error handling implemented yet.

const zipCode = require('german-zip-codes')

Issues & Improvements

You can report issues or submit ideas for improvements to the github repo.

License

MIT. Feel free to do whatever you want to, credits are welcome. Data based on German-Zip-Codes.csv" from jbspeakr.