Created
May 16, 2019 07:05
-
-
Save olecksamdr/98e1ae9a483570756bbddfa069af42ec 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
export const phoneFormatter = phone => | |
phone ? phone.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2 - $3') : null; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment