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). WA needs one of Western
Australia's postcodes (WA 6000), since WA 9810 is a Washington ZIP code cut short. A postcode alone is not
enough: four digits end addresses in many countries.
インポート
import { looksAustralian } from "@johnmorrisdotca/address-plus/au";
定義
function looksAustralian(text: string): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | The address as one string. |
戻り値
boolean
true when the address is Australian beyond doubt, false otherwise.
例
import { looksAustralian } from "@johnmorrisdotca/address-plus/au";
console.log([looksAustralian("12 Smith St, Parramatta NSW 2150"), looksAustralian("123 Main St, Seattle, WA 9810")]);
// → [true,false][ true, false ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。