getPostalPrefixesForProvince関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The postal code prefixes a province or territory uses, the reverse of getProvinceFromPostalCode. Every code
starting with one of them belongs to that province.
インポート
import { getPostalPrefixesForProvince } from "@johnmorrisdotca/address-plus";
定義
function getPostalPrefixesForProvince(province: string): string[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
province | string | The province or territory's two-letter code. |
戻り値
string[]
The prefixes, a letter or, for the territories, three characters; an empty array for an unknown code.
例
import { getPostalPrefixesForProvince } from "@johnmorrisdotca/address-plus";
console.log(getPostalPrefixesForProvince("NU"));
// → ["X0A","X0B","X0C"][ 'X0A', 'X0B', 'X0C' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。