Reference · Australian country module
AustralianPostcodeRangetype
One block of postcodes Australia Post allocates to a state or territory: every postcode from from to to,
inclusive, written as four digits.
Import it
import type { AustralianPostcodeRange } from "@johnmorrisdotca/address-plus/au";
Also exported from: @johnmorrisdotca/address-plus
Definition
interface AustralianPostcodeRange {
state: AustralianStateCode;
from: string;
to: string;
use: "delivery" | "po-box";
}
Members
| Name | Type | Description |
|---|---|---|
state | AustralianStateCode | |
from | string | |
to | string | |
use | "delivery" | "po-box" |
Examples
import { AU_POSTCODE_RANGES } from "@johnmorrisdotca/address-plus/au";
import type { AustralianPostcodeRange } from "@johnmorrisdotca/address-plus/au";
console.log(AU_POSTCODE_RANGES.find((range) => range.state === "TAS"));
// → {"state":"TAS","from":"7000","to":"7999","use":"delivery"}{ state: 'TAS', from: '7000', to: '7999', use: 'delivery' }What it prints (run when this page was built)