Parse the name of contact info like name <mail> (url)
let info = 'Shinnosuke Watanabe <snnskwtnb@gmail.com> (https://github.com/shinnn)';
parseAuthorName(info); //=> 'Shinnosuke Watanabe'
npm install parse-author-name
bower install parse-author-name
const parseAuthorName = require('shinnn/parse-author-name.js');
Download the script file directly.
string: String
Return: String
parseAuthorName('foo <bar> (baz)'); //=> 'foo'
parseAuthorName('<foo> (bar)'); //=> ''
This project is a fork of somebody authored by Sindre Sorhus. Thanks, sindresorhus.
MIT © Sindre Sorhus
Copyright (c) 2014 - 2015 Shinnosuke Watanabe
Licensed under the MIT License.