I am building an mobile application using React native & Node js ,Mongo. My application requires syncing the Phone book of users with the server. Users are saving the Phone Numbers of contact in different format. Some with Country code , w/o country code, Space between, Brackets. HOw to convert all of them into e.164 format. Also tell the best practices to do that
Atul Sharma
Full Stack Developer | Cloud Native Applications
You can use
libphonenumberlibrary by Google .. Same library is used by Google in android . They have ported the same to use with js applicationgithub.com/googlei18n/libphonenumber/tree/master/….I'm not sure if npm module for same is available or not . But, can get most of the calculation logic and edge cases.