リファレンス
オーストラリアのモジュール
import { … } from "@johnmorrisdotca/address-plus/au";
最小化と gzip 圧縮をしたサイズは 7.2 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
AU_CROSS_BORDER_POSTCODES | 定数 | 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. |
AU_EXTERNAL_TERRITORY_POSTCODES | 定数 | The postcodes the Australian Bureau of Statistics places, wholly or partly, in the Other Territories: Jervis Bay, Norfolk Island, Christmas Island and the Cocos (Keeling) Islands. |
AU_POSTCODE_RANGES | 定数 | The blocks of postcodes Australia Post allocates to each state and territory. |
AU_STATES | 定数 | The six states and two territories of Australia, in order of their codes, each with Australia Post's code, the ISO 3166-2 code and its name in English and in Japanese. |
AU_STREET_TYPES | 定数 | Australia's street types: each AS4590 abbreviation, in proper case as the parser reports it, with the word it stands for. |
australia | 定数 | Australia's module, for parseLocation and validateAddress: pass it in countries, and an address that ends with a state and its postcode (or Australia) is read as Australian; country: "AU" reads any address as one. |
AustralianAddressFields | 型 | The fields an Australian address fills beside the shared ones. |
AustralianPostcodeRange | 型 | One block of postcodes Australia Post allocates to a state or territory: every postcode from from to to, inclusive, written as four digits. |
AustralianState | 型 | An Australian state or territory in the tables: Australia Post's code, the ISO 3166-2 code, and its name in English and in Japanese (from kuni, which takes them from Unicode CLDR and Wikidata). |
AustralianStateCode | 型 | The code of an Australian state or territory, as Australia Post writes it on the last line of an address. |
AustraliaPostFormattingOptions | 型 | Options for formatAustraliaPost. |
compareAustralianAddresses | 関数 | Compares two Australian addresses field by field: the unit, level, lot, number, street, suburb, state and postcode. |
CountryComparison | 型 | What a country module's comparer returns: whether the two addresses are the same delivery point, and every field that differs once both are in the same form (letter case, punctuation, a street type written out or abbreviated). |
CountryDifference | 型 | One way two addresses differ, as a country module's comparer reports it: the field, and its value in each address after both were put in the same form. |
CountryModule | 型 | A country's address module: its codes, how to tell its addresses apart, and its parser, validator, formatter and comparer. |
CountryValidation | 型 | What a country module's validator returns: the errors and the warnings it found. |
expandAustralianStreetType | 関数 | The word an AS4590 street type stands for: Pde is Parade. |
findAustralianState | 関数 | 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. |
formatAustraliaPost | 関数 | Writes an Australian address as Australia Post asks: the building's name, then the delivery line (unit and level before the number, the street type abbreviated), then the suburb, state and postcode, both in capitals with no punctuation. |
FormattedAddress | 型 | A formatted address: its lines, and the same on one line. |
getPostcodeRangesForAustralianState | 関数 | The blocks of postcodes Australia Post allocates to a state or territory. |
getStateFromAustralianPostcode | 関数 | The state or territory whose block of postcodes a postcode is in. |
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. |
looksAustralian | 関数 | Whether an address is surely Australian, with no hint: it ends with Australia, or with a state and an Australian postcode (NSW 2150, Victoria 3000, VIC 2000, whose postcode is Sydney's). |
parseAustralianAddress | 関数 | Parses an Australian address into its parts, as Australia Post lays one out: the delivery line, then the suburb or town, the state and the postcode. |
ParsedAddress | 型 | What parseLocation returns: every part it found, each absent when the address has none. |
ParseOptions | 型 | Options for every parser: the country, strict postal codes, snake_case keys and the rest. |
validateAustralianAddress | 関数 | Checks an Australian address against Australia Post's blocks of postcodes: the postcode is four digits, some state's block holds it, and it is the state named, or one it serves across a border (from the ABS's Postal Areas). |
ValidationError | 型 | One finding of a validator: the field it is about, its code, a message, and how serious it is. |
ValidationOptions | 型 | Options for the validators: which parts an address must have, which kinds are allowed, and whether a postal code that does not match its region is an error. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。