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

JapaneseMunicipalitytype

A municipality (市区町村) in the tables: its JIS code, its prefecture's code, its official name with the district for a town or village in one, its reading and its romaji.

Import it

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

Also exported from: @johnmorrisdotca/address-plus

Definition

interface JapaneseMunicipality {
    code: string;
    prefecture: string;
    name: string;
    kana: string;
    romaji: string;
}

Members

NameTypeDescription
codestring
prefecturestring
namestring
kanastring
romajistring

Examples

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

console.log(findMunicipalityByCode("13101"));
// → {"code":"13101","prefecture":"13","name":"千代田区","kana":"チヨダク","romaji":"Chiyoda-ku"}
{
  code: '13101',
  prefecture: '13',
  name: '千代田区',
  kana: 'チヨダク',
  romaji: 'Chiyoda-ku'
}

What it prints (run when this page was built)

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