humanparser
humanparser copied to clipboard
Parse name from email
Do you consider valuable and meaningful feature for parsing name out of an email address? E.g. [email protected] => Mila Votradovec.
I am willing to contribute, but want to discuss the idea first.
Yes, I think that's a great idea. You could just split on . and then join on space delimiter and then run the same name matching function on the string.
parser.parseNameFromEmail = function(email){
var emailFullName = email.replace(/@.*$/g, '').split('.').join(' ');
return parser.parseName(emailFullName);
};
You'd have to strip off everything after the @ first.
I'm happy to have this addition. Please include a test.
@chovy I realised this is still here after 2 years :-D I'll try to submit a PR by the end of this week.
Sounds good!