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_POSTCODE_DISTRICTSconstant

Every postcode district in Great Britain, by area: the numbered districts as runs, then those with a letter. Read from Ordnance Survey's Code-Point Open (OGL v3; contains Royal Mail data © Royal Mail copyright and database right). Northern Ireland's BT area is not in it, so its districts are not listed.

Import it

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

Definition

const GB_POSTCODE_DISTRICTS: Readonly<Record<string, string>>

Examples

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

console.log(GB_POSTCODE_DISTRICTS["EC"]);
// → "1A,1M,1N,1P,1R,1V,1Y,2A,2M,2N,2P,2R,2V,2Y,3A,3M,3N,3P,3R,3V,4A,4M,4N,4P,4R,4V,4Y"
1A,1M,1N,1P,1R,1V,1Y,2A,2M,2N,2P,2R,2V,2Y,3A,3M,3N,3P,3R,3V,4A,4M,4N,4P,4R,4V,4Y

What it prints (run when this page was built)

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