Skip to the content

address-plusアドレスプラス

Parse, validate, format and compare addresses locally, add country modules and mount an optional native form field.

address-plus extends the parse-address style with typed results, validation, formatting and country modules. About the name

Contents

Reference · Australian country module

AU_CROSS_BORDER_POSTCODESconstant

The postcodes whose area lies in more than one state or territory, each with the states it lies in, the one with most of it first. Read from the Australian Bureau of Statistics' Postal Areas (ASGS Edition 3, CC BY 4.0), which approximate Australia Post's postcodes by mesh blocks, so a state with a sliver of a postcode's area is listed too. An address naming any of these states passes the postcode check.

Import it

import { AU_CROSS_BORDER_POSTCODES } from "@johnmorrisdotca/address-plus/au";

Definition

const AU_CROSS_BORDER_POSTCODES: Readonly<Record<string, readonly AustralianStateCode[]>> = {
    "2406": [
        "NSW",
        "QLD"
    ],
    "2611": [
        "ACT",
        "NSW"
    ],
    "2618": [
        "ACT",
        "NSW"
    ],
    "2620": [
        "NSW",
        "ACT"
    ],
    "3644": [
        "VIC",
        "NSW"
    ],
    "3691": [
        "VIC",
        "NSW"
    ],
    "3707": [
        "VIC",
        "NSW"
    ],
    "4375": [
        "QLD",
        "NSW"
    ],
    "4377": [
        "QLD",
        "NSW"
    ],
    "4380": [
        "QLD",
        "NSW"
    ],
    "4383": [
        "QLD",
        "NSW"
    ],
    "4385": [
        "QLD",
        "NSW"
    ],
    "4825": [
        "QLD",
        "NT"
    ],
    "0872": [
        "NT",
        "SA",
        "WA"
    ]
}

Examples

import { AU_CROSS_BORDER_POSTCODES } from "@johnmorrisdotca/address-plus/au";

console.log(AU_CROSS_BORDER_POSTCODES["2620"]);
// → ["NSW","ACT"]
[ 'NSW', 'ACT' ]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/address-plus 1.7.0.