GitXplorerGitXplorer
K

uk_postcode

public
10 stars
0 forks
2 issues

Commits

List of commits on branch master.
Verified
3e2220fa1bdfc595f68ce91bb6a3f5bfee23b3dd

Merge pull request #43 from KushalP/dependabot/add-v2-config-file

KKushalP committed 4 years ago
Verified
7e9d60115fafb3e0c4ea615cc474643bb7d11dae

Upgrade to GitHub-native Dependabot

ddependabot-preview[bot] committed 4 years ago
Verified
ffce680cdefe5a9fb21d9f5f8422acc3a8fd6e02

Merge pull request #42 from KushalP/dependabot/hex/earmark-1.4.15

ddependabot-preview[bot] committed 4 years ago
Verified
3f0c8628b42376a14b6da3df8aef9cd7a3626fa5

Bump earmark from 1.4.14 to 1.4.15

ddependabot-preview[bot] committed 4 years ago
Verified
43d41b5169e27b666479272e2bf7ffb147636b08

Merge pull request #41 from KushalP/dependabot/hex/ex_doc-0.24.2

ddependabot-preview[bot] committed 4 years ago
Verified
38290acdf18098418daf2bb2592ad910e43cd29e

Bump ex_doc from 0.24.1 to 0.24.2

ddependabot-preview[bot] committed 4 years ago

README

The README file for this repository.

UK Postcode

Build Status Hex Version Inline docs

UK postcode parsing and validation for Elixir. Based on the excellent Ruby library of the same name by @threedaymonk.

Usage

Validate full postcodes or parts of a postcode.

UKPostcode.valid? "W1A 1AA" #=> true
UKPostcode.full? "W1A 1AA"  #=> true
UKPostcode.outcode? "W1A"   #=> true

Extract parts of a full postcode.

UKPostcode.outcode "W1A 1AA" #=> "W1A"
UKPostcode.incode "W1A 1AA"  #=> "1AA"

Normalise badly formatted postcodes.

UKPostcode.normalise "w1a1aa"  #=> "W1A 1AA"