Reference · German country module
GermanPostcodetype
A postcode taken apart: the Land it is in, and whether GeoNames' list has it.
Import it
import type { GermanPostcode } from "@johnmorrisdotca/address-plus/de";
Also exported from: @johnmorrisdotca/address-plus
Definition
interface GermanPostcode {
postcode: string;
state?: GermanStateCode;
known: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
postcode | string | |
state (optional) | GermanStateCode | undefined | |
known | boolean |
Examples
import { parseGermanPostcode } from "@johnmorrisdotca/address-plus/de";
import type { GermanPostcode } from "@johnmorrisdotca/address-plus/de";
console.log(parseGermanPostcode("10115"));
// → {"postcode":"10115","state":"BE","known":true}{ postcode: '10115', state: 'BE', known: true }What it prints (run when this page was built)