Skip to content

Look up UK geographic dialling codes with JavaScript

License

Notifications You must be signed in to change notification settings

CloudUnder/area-codes-uk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UK geographic area codes

Build Status npm version

A dataset with over 700 dialling codes of the United Kingdom, which comes with a simple function to look up areas by phone number.

Installation

With NPM:

npm install area-codes-uk --save

Usage

Supports multiple prefixes and ignores suffixes. Examples:

var areaCodes = require('area-codes-uk');
areaCodes.lookupUK('01619999999'); // Manchester
areaCodes.lookupUK('+442099999999'); // London
areaCodes.lookupUK('00441890399999'); // Coldstream
areaCodes.lookupUK('[email protected]'); // Isle of Man

If no matching area can be found, the function will return null.

Data source

List of UK area codes: © Ofcom copyright 2006-11

About

Look up UK geographic dialling codes with JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published