F
F
FastClick2022-01-15 19:03:34
Node.js
FastClick, 2022-01-15 19:03:34

What library should I use to format a phone number in Node.JS?

The bottom line is this, there is a Russian number: 79123456789, it must be brought to the form: +7 912 345-67-89or +7 (912) 345-67-89

But here you need to take into account another factor. If the number is not complete, then it must also be formatted.

Example:

Yes 79, you need to +7 9
eat 79123456, you need +7 912 345-6

Didn't find such a library that meets the above requirements :( Can anyone tell me? :)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question