Reference · Australian country module
findAustralianStatefunction
Finds an Australian state or territory by its code (VIC, AU-VIC, Vic.) or its name in English or Japanese
(Victoria, ビクトリア州), in any letter case.
Import it
import { findAustralianState } from "@johnmorrisdotca/address-plus/au";
Definition
function findAustralianState(text: string): AustralianState | null
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The code or the name. |
Returns
AustralianState | null
The state, or null when nothing matches.
Examples
import { findAustralianState } from "@johnmorrisdotca/address-plus/au";
console.log(findAustralianState("n.s.w.")?.name);
// → "New South Wales"New South WalesWhat it prints (run when this page was built)