pkgauthor
v2.0.1
Published
parses the author field of a package.json
Downloads
7
Readme
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 = require('pkgauthor')
var input = {
name: 'Evan Lucas'
, email: '[email protected]'
, url: 'http://curapps.com'
}
var out = author(input)
console.log(out)
// => {
// => name: 'Evan Lucas',
// => email: '[email protected]'
// => url: 'http://curapps.com'
// => }
pkgauthor(String)
var author = require('pkgauthor')
var input = 'Evan Lucas <[email protected]> (http://curapps.com)'
var out = author(input)
console.log(out)
// => {
// => name: 'Evan Lucas',
// => email: '[email protected]'
// => url: 'http://curapps.com'
// => }
Tests
$ npm test
Coverage
$ npm run cover
License
MIT