AddressMatchType型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How strongly two addresses match, from exact to none.
インポート
import type { AddressMatchType } from "@johnmorrisdotca/address-plus";
定義
type AddressMatchType = "exact" | "strong" | "moderate" | "weak" | "none";
例
import { compareAddresses, parseLocation } from "@johnmorrisdotca/address-plus";
import type { AddressMatchType } from "@johnmorrisdotca/address-plus";
const parsedAddress1=parseLocation("123 Main St, Anytown, NY 12345");
if (!parsedAddress1) throw new Error("The example address did not parse.");
const parsedAddress2=parseLocation("456 Oak Ave, Portland, OR 97201");
if (!parsedAddress2) throw new Error("The example address did not parse.");
console.log(compareAddresses(parsedAddress1, parsedAddress2).matchType);
// → "none"none出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。