Ocelot-Social/webapp/components/utils/NormalizeEmail.js
roschaefer 973d3f899a Remove dots of gmail addresses
I had a chat with our moderator Daniel. He asks us to remove dots from
gmail accounts. He finds it more consistent and he has no problem to
write a mail to a gmail address without dots. He is OK to save the
email address different from how a user memorizes it.
2019-11-28 14:02:11 +01:00

12 lines
346 B
JavaScript

import { normalizeEmail } from 'validator'
export default email =>
normalizeEmail(email, {
// gmail_remove_dots: false, default
gmail_remove_subaddress: false,
// gmail_convert_googlemaildotcom: true, default
outlookdotcom_remove_subaddress: false,
yahoo_remove_subaddress: false,
icloud_remove_subaddress: false,
})