A small utility which maps E.164 international phone numbers to ISO 3166 country codes as well as the ISO 3166 country codes to country phone codes.
The utility is targeted for a use case such as retrieving E.164 from a web API or sending it back and displaying a list of countries next to a phone number in a browser's drop down.
The existing Google's libphonenumber is too big. This utility was inspired by e164.js. I wanted to use it initially but it did not completely serve my needs.
##Installation bower install e164-phones-countries
E164.findIso3166('12010000000'); //Returns US
E164.findIso3166('12040000000'); //Returns CA
E164.findPhoneCountryCode('US'); //Returns 1
E164.findPhoneCountryCode('GB'); //Returns 44
See tests for more examples.