Skip to content
This repository was archived by the owner on Jul 12, 2026. It is now read-only.

futurematik/postcodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Postcodes

Information about UK postcode areas and districts. Based on data prepared by Chris Bell, Originally from the Office For National Statistics Open Geography Portal.

API

export interface PostcodeArea {
  code: string;
  name: string;
}

export interface PostcodeDistrict {
  code: string;
  name: string;
  area: PostcodeArea;
}

export function getPostcodeDistrict(code: string): PostcodeDistrict;
export function getPostcodeArea(code: string): PostcodeDistrict;

Examples

const district = getPostcodeDistrict('E2');
district = {
  code: 'E3',
  name:
    'Bow, Bromley-by-Bow, Old Ford, Mile End, Three Mills, London Gas Museum',
  area: {
    code: 'E',
    name: 'East London',
  },
};

CLI

$ node cli.js E3
Looking up district E3
{ code: 'E3',
  name: 'Bow, Bromley-by-Bow, Old Ford, Mile End, Three Mills, London Gas Museum',
  area: { name: 'East London' } }

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors