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

municipalitiesOffunction

Every municipality of a prefecture, the designated cities included.

Import it

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

Also exported from: @johnmorrisdotca/address-plus

Definition

function municipalitiesOf(prefectureCode: string): readonly JapaneseMunicipality[]

Parameters

NameTypeDescription
prefectureCodestring

The prefecture's JIS code.

Returns

readonly JapaneseMunicipality[]

The municipalities, an empty array for an unknown code.

Examples

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

console.log(municipalitiesOf("47").length);
// → 41
41

What it prints (run when this page was built)

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