Created
July 4, 2019 21:40
-
-
Save walison17/f8e8fec37199b52a239300f28e16d783 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const maskPhone = (phone) => phone.replace(/^(\d{2})(\d{4,5})(\d{4})$/, '($1) $2-$3'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment