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

AustralianAddressFieldstype

The fields an Australian address fills beside the shared ones. The shared fields keep their meaning: number is the street number, street and type the street's name and its type (Australia Post's abbreviation, St, Pde, Cres), secUnitType and secUnitNum the unit (Unit 3) or the postal delivery (PO Box 37, Locked Bag 801), city the suburb or town, state the state's code and zip the postcode.

Import it

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

Also exported from: @johnmorrisdotca/address-plus

Definition

interface AustralianAddressFields {
    floorType?: string;
    lot?: string;
}

Members

NameTypeDescription
floorType (optional)string | undefined
lot (optional)string | undefined

Examples

import { parseAustralianAddress } from "@johnmorrisdotca/address-plus/au";
import type { AustralianAddressFields } from "@johnmorrisdotca/address-plus/au";

console.log(parseAustralianAddress("Level 6, 51 Jacobson St, Brisbane QLD 4000")?.floorType);
// → "Level"
Level

What it prints (run when this page was built)

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