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

findMunicipalityByCodefunction

The municipality with a JIS X 0402 code, a designated city's own code included.

Import it

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

Also exported from: @johnmorrisdotca/address-plus

Definition

function findMunicipalityByCode(code: string): JapaneseMunicipality | null

Parameters

NameTypeDescription
codestring

The five-digit code.

Returns

JapaneseMunicipality | null

The municipality, or null for a code the tables do not have.

Examples

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

console.log(findMunicipalityByCode("13101")?.name);
// → "千代田区"
千代田区

What it prints (run when this page was built)

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