This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Accepts a single paramater which is one or more emails separated | |
// by space,comma,semicolon,tab, or newline. | |
// Returns an array of tokens that should be emails | |
// Does not validate emails to see if they are well formed. | |
exports.parseEmails = function(emails) { | |
return emails.toLowerCase().split(/[\s,;\t\n]+/); | |
}; | |