20matan / phoneparser

Parse phone numbers into country code, area code, and number

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PhoneParser

A very simple to use library that parse phone numbers into country code, area code, and number. It uses libphonenumber.

Here is a demo: https://rawgit.com/Gilshallem/phoneparser/master/demo.htm

Usage

  1. Download phoneparser.js
  2. Link the js file to your html or any other type of project.

Thats it!

Example

parsePhone("12025550104");

result: { countryCode:1, areaCode:202, number:5550104, countryISOCode:"US" }

ENJOY!! :)

About

Parse phone numbers into country code, area code, and number

License:GNU General Public License v2.0


Languages

Language:HTML 100.0%