var parse = require('{%= name %}');
Works with a flexible range of formats, any of the properties can be used or missing:
Name
Name <email> (url)
Name <email>(url)
Name<email> (url)
Name<email>(url)
Name (url) <email>
Name (url)<email>
Name(url) <email>
Name(url)<email>
Name (url)
Name(url)
Name <email>
Name<email>
<email> (url)
<email>(url)
(url) <email>
(url)<email>
<email>
(url)
var author = parse('Jon Schlinkert <jon.schlinkert@sellside.com> (https://github.com/jonschlinkert)');
console.log(author);
//=> {name: 'Jon Schlinkert', email: 'jon.schlinkert@sellside.com', url: 'https://github.com/jonschlinkert'}
console.log(parse('Jon Schlinkert (https://github.com/jonschlinkert)'));
//=> {name: 'Jon Schlinkert', url: 'https://github.com/jonschlinkert'}
console.log(parse('Jon Schlinkert <jon.schlinkert@sellside.com>'));
//=> {name: 'Jon Schlinkert', email: 'jon.schlinkert@sellside.com'}
console.log(parse(''));
//=> {}