DemocracyOS/app

View on GitHub
lib/normalize-email/normalize-email.js

Summary

Maintainability
A
0 mins
Test Coverage
var verigy = require('verigy')

module.exports = function (email, options) {
  if (!email) return null
  if (typeof email !== 'string') return null

  options = options || {}

  if (!options.allowEmailAliases) email = verigy(email)
  return email.toLowerCase()
}