Skip to content

Instantly share code, notes, and snippets.

@andyford
Created September 22, 2020 18:14
Show Gist options
  • Save andyford/973f25be751595aa6a5c69a5f309f906 to your computer and use it in GitHub Desktop.
Save andyford/973f25be751595aa6a5c69a5f309f906 to your computer and use it in GitHub Desktop.
Remove plus sign and subsequent characters from an email address
// 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