mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
11 lines
231 B
CoffeeScript
11 lines
231 B
CoffeeScript
mimelib = require("mimelib")
|
|
|
|
|
|
module.exports = EmailHelper =
|
|
|
|
parseEmail: (email) ->
|
|
email = mimelib.parseAddresses(email or "")[0]?.address?.toLowerCase()
|
|
if !email? or email == ""
|
|
return null
|
|
else
|
|
return email
|