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 · British country module

GB_DISTRICT_NATIONSconstant

The postcode districts not wholly in the nation of their area, each with the nations its postcodes lie in, the one with most of them first: the districts that cross the borders of Wales and of Scotland, and those wholly across one (CH5 to CH8 are in Wales, though most of the CH area is in England). From Code-Point Open (OGL v3).

Import it

import { GB_DISTRICT_NATIONS } from "@johnmorrisdotca/address-plus/gb";

Definition

const GB_DISTRICT_NATIONS: Readonly<Record<string, readonly UKNationCode[]>>

Examples

import { GB_DISTRICT_NATIONS } from "@johnmorrisdotca/address-plus/gb";

console.log([GB_DISTRICT_NATIONS["TD15"], GB_DISTRICT_NATIONS["CH5"]]);
// → [["ENG","SCT"],["WLS"]]
[ [ 'ENG', 'SCT' ], [ 'WLS' ] ]

What it prints (run when this page was built)

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