looksBrazilian関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Whether an address is surely Brazilian, with no hint: it ends with Brazil, Brasil or BR, or with a CEP written with its
hyphen (01310-200, five digits, a hyphen and three) in the range of a state, after the word CEP or a Brazilian state's
code (SP). A bare number of that shape claims nothing: a US ZIP+4 has four digits after the hyphen and Portugal's has three
before it, but other places may write five and three.
インポート
import { looksBrazilian } from "@johnmorrisdotca/address-plus/br";
定義
function looksBrazilian(text: string): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | The address as one string. |
戻り値
boolean
true when the address is Brazilian beyond doubt, false otherwise.
例
import { looksBrazilian } from "@johnmorrisdotca/address-plus/br";
console.log([looksBrazilian("Rua Augusta, 100, São Paulo - SP, 01305-000"), looksBrazilian("123 Main St, Seattle, WA 98101-1234")]);
// → [true,false][ true, false ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。