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 · /nl

PostcodeRegiontype

A region a postcode can be in, as a country's table holds it: its code, its ISO 3166-2 code, and its name in English and in Japanese (from kuni, which takes them from Unicode CLDR and Wikidata).

Import it

import type { PostcodeRegion } from "@johnmorrisdotca/address-plus/nl";

Also exported from: @johnmorrisdotca/address-plus/es, @johnmorrisdotca/address-plus/it, @johnmorrisdotca/address-plus/nz, @johnmorrisdotca/address-plus/in, @johnmorrisdotca/address-plus/kr, @johnmorrisdotca/address-plus/br, @johnmorrisdotca/address-plus

Definition

interface PostcodeRegion {
    code: string;
    iso: string;
    name: string;
    nameJa: string;
}

Members

NameTypeDescription
codestring
isostring
namestring
nameJastring

Examples

import { ES_PROVINCES } from "@johnmorrisdotca/address-plus/es";
import type { PostcodeRegion } from "@johnmorrisdotca/address-plus/es";

const madrid: PostcodeRegion | undefined = ES_PROVINCES.find((province) => province.code === "M");
console.log(madrid);
// → {"code":"M","iso":"ES-M","name":"Madrid Province","nameJa":"マドリード県"}
{ code: 'M', iso: 'ES-M', name: 'Madrid Province', nameJa: 'マドリード県' }

What it prints (run when this page was built)

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