looksBritish関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Whether an address is surely British, with no hint: it ends with the United Kingdom or one of its nations (or
Jersey, Guernsey or the Isle of Man), or it holds a full postcode in Royal Mail's grammar whose area Royal Mail
uses, or BFPO and a number. A Canadian postal code never passes: it ends in a digit (M5V 1A1), a British
postcode in two letters (W1A 0AX).
インポート
import { looksBritish } from "@johnmorrisdotca/address-plus/gb";
定義
function looksBritish(text: string): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | The address as one string. |
戻り値
boolean
true when the address is British beyond doubt, false otherwise.
例
import { looksBritish } from "@johnmorrisdotca/address-plus/gb";
console.log([looksBritish("10 Downing Street, London SW1A 2AA"), looksBritish("100 Queen St W, Toronto, ON M5H 2N2")]);
// → [true,false][ true, false ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。