Created
September 22, 2020 18:14
-
-
Save andyford/973f25be751595aa6a5c69a5f309f906 to your computer and use it in GitHub Desktop.
Remove plus sign and subsequent characters from an email address
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
| // so `[email protected]` becomes `[email protected]` | |
| const dePlussedEmail = (email) => email.split('@')[0].split('+')[0] + '@' + email.split('@')[1]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment