Normalize + and . emails -- [email protected] => [email protected]
MIT License
Normalize emails for uniqueness validation. This will convert the email to lowercase, remove dots (.
), and plus signs
followed by arbitrary strings (+foobar
).
Based on normailize.
npm install --save normalize-email
var normalizeEmail = require('normalize-email')
normalizeEmail('[email protected]') // => '[email protected]'
normalizeEmail('[email protected]') // => '[email protected]'
normalizeEmail('[email protected]') // => '[email protected]'
normalizeEmail('[email protected]') // => '[email protected]'
normalizeEmail('[email protected]') // => '[email protected]'
Normalization rules vary by domain. The rules implemented by this package are:
+
mark and anything after it.
marksEmails are normalized by domain as follows:
gmail.com
— plus and dotgooglemail.com
(alias of gmail.com) — plus and dotMIT
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Crafted with <3 by John Otander (@4lpine).
This package was initially generated with yeoman and the p generator.