getPostalPrefixesForPrefecture関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The three-digit postal prefixes a prefecture's codes begin with, the reverse of
getPrefectureFromJapanesePostalCode. A prefix on a border is listed under the prefecture most of its codes belong
to.
インポート
import { getPostalPrefixesForPrefecture } from "@johnmorrisdotca/address-plus/jp";
ほかのエクスポート元: @johnmorrisdotca/address-plus
定義
function getPostalPrefixesForPrefecture(prefecture: string): string[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
prefecture | string | The prefecture, by JIS code, name or romaji, as |
戻り値
string[]
The prefixes in ascending order, an empty array for an unknown prefecture.
例
import { getPostalPrefixesForPrefecture } from "@johnmorrisdotca/address-plus/jp";
console.log(getPostalPrefixesForPrefecture("沖縄県"));
// → ["900","901","902","903","904","905","906","907"][
'900', '901',
'902', '903',
'904', '905',
'906', '907'
]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。