How to parse, format, or validate a phone number?
Trying to come up with something with free form validation: searching, validating and formatting a phone number and stumbled upon the library libphonenumber . I looked, I was crazy about the sizes, looked again in the hope of finding the desired algorithm of work, which works out here , but my knowledge was not enough.
To place the code, please use CodePen or similar tool. Thanks you!