Reference · Australian country module
AustralianStateCodetype
The code of an Australian state or territory, as Australia Post writes it on the last line of an address.
Import it
import type { AustralianStateCode } from "@johnmorrisdotca/address-plus/au";
Also exported from: @johnmorrisdotca/address-plus
Definition
type AustralianStateCode = "ACT" | "NSW" | "NT" | "QLD" | "SA" | "TAS" | "VIC" | "WA";
Examples
import { getStateFromAustralianPostcode } from "@johnmorrisdotca/address-plus/au";
import type { AustralianStateCode } from "@johnmorrisdotca/address-plus/au";
console.log(getStateFromAustralianPostcode("3000"));
// → "VIC"VICWhat it prints (run when this page was built)