looksSpanish関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Whether an address is surely Spanish, with no hint: it ends with Spain, España or ES, or its last line is a postcode
of five digits (the first two 01 to 52) and a place while a part of the address begins with a Spanish street's type
(Calle, C/, Avenida, Paseo, Plaza) or is an Apartado de Correos, and no state's code stands before the
postcode.
インポート
import { looksSpanish } from "@johnmorrisdotca/address-plus/es";
定義
function looksSpanish(text: string): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | The address as one string. |
戻り値
boolean
true when the address is Spanish beyond doubt, false otherwise.
例
import { looksSpanish } from "@johnmorrisdotca/address-plus/es";
console.log([looksSpanish("Calle Mayor 5, 28013 Madrid"), looksSpanish("Calle Ocho, Miami, FL 33135")]);
// → [true,false][ true, false ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。