Skip to the content

address-plusアドレスプラス

Parse, validate, format and compare addresses locally, add country modules and mount an optional native form field.

address-plus extends the parse-address style with typed results, validation, formatting and country modules. About the name

Contents

Reference · Japanese addresses

JapanesePrefecturetype

A prefecture (都道府県) in the tables: its JIS code, official name, katakana reading and romaji.

Import it

import type { JapanesePrefecture } from "@johnmorrisdotca/address-plus/jp";

Also exported from: @johnmorrisdotca/address-plus

Definition

interface JapanesePrefecture {
    code: string;
    name: string;
    kana: string;
    romaji: string;
}

Members

NameTypeDescription
codestring
namestring
kanastring
romajistring

Examples

import { findPrefecture } from "@johnmorrisdotca/address-plus/jp";
import type { JapanesePrefecture } from "@johnmorrisdotca/address-plus/jp";

console.log(findPrefecture("13"));
// → {"code":"13","name":"東京都","kana":"トウキョウト","romaji":"Tokyo-to"}
{ code: '13', name: '東京都', kana: 'トウキョウト', romaji: 'Tokyo-to' }

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/address-plus 1.7.0.