getStatesForAustralianPostcode関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Every state or territory a postcode serves: its block's state, and for a postcode that crosses a border, the states across it too, the one with most of the postcode's area first.
インポート
import { getStatesForAustralianPostcode } from "@johnmorrisdotca/address-plus/au";
定義
function getStatesForAustralianPostcode(postcode: string): AustralianStateCode[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
postcode | string | Four digits. |
戻り値
AustralianStateCode[]
The states' codes; an empty array when the postcode is not in any block.
例
import { getStatesForAustralianPostcode } from "@johnmorrisdotca/address-plus/au";
console.log(getStatesForAustralianPostcode("0872"));
// → ["NT","SA","WA"][ 'NT', 'SA', 'WA' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。