Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Information about a phone number

Is there any lib for node.js that receives a phone number (in any format), converts it to a default format and tells me info about the number (e.g: country, city, etc)?

like image 771
donald Avatar asked Jan 07 '12 12:01

donald


1 Answers

I'm not aware of one and I also searched the npm registry.

Google has libphonenumber for dealing with phone numbers and has a javascript API.

From their site:

Google's common Java, C++ and Javascript library for parsing, formatting, storing and validating international phone numbers. The Java version is optimized for running on smartphones.

There's also an SO post on getting phone country codes: List of phone number country codes

like image 171
bryanmac Avatar answered Oct 05 '22 19:10

bryanmac