pkgauthor
parses the author field of a package.json
Note: only works on iojs and node v4+. To use with an older version of node,
install pkgauthor@1
.
Install
$ npm install --save pkgauthor
Usage
pkgauthor(Object)
var author = var input = name: 'Evan Lucas' email: 'evanlucas@me.com' url: 'http://curapps.com'var out = console// => {// => name: 'Evan Lucas',// => email: 'evanlucas@me.com'// => url: 'http://curapps.com'// => }
pkgauthor(String)
var author = var input = 'Evan Lucas <evanlucas@me.com> (http://curapps.com)'var out = console// => {// => name: 'Evan Lucas',// => email: 'evanlucas@me.com'// => url: 'http://curapps.com'// => }
Tests
$ npm test
Coverage
$ npm run cover
License
MIT