CA_REGIONS定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Every name and other spelling of a Canadian province or territory as a Region object, for fuzzy matching by
normalizeRegion.
インポート
import { CA_REGIONS } from "@johnmorrisdotca/address-plus";
定義
const CA_REGIONS: Region[] = Object.entries(CA_PROVINCES).map(([name, abbr]) => ({
abbr,
country: "CA",
name,
}))
例
import { CA_REGIONS } from "@johnmorrisdotca/address-plus";
console.log(CA_REGIONS.filter((region) => region.abbr === "QC").map((region) => region.name));
// → ["quebec","québec","pq","que"][ 'quebec', 'québec', 'pq', 'que' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。