findPrefecture関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The prefecture a name, reading, romaji spelling or JIS code refers to: 東京都, 東京, トウキョウト, Tokyo, Osaka Prefecture, 13.
インポート
import { findPrefecture } from "@johnmorrisdotca/address-plus/jp";
ほかのエクスポート元: @johnmorrisdotca/address-plus
定義
function findPrefecture(text: string): JapanesePrefecture | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | The name, reading or code; letter case and macrons do not matter. |
戻り値
JapanesePrefecture | null
The prefecture, or null when the text names none.
例
import { findPrefecture } from "@johnmorrisdotca/address-plus/jp";
console.log(findPrefecture("Osaka Prefecture")?.name);
// → "大阪府"大阪府出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。