$ npm install stringify-author
Stringify an authors object to
name <email> (url)
.
Install with npm
$ npm i stringify-author --save
var stringify = require('stringify-author');
var authors = stringify({
name: 'Jon Schlinkert',
email: 'jon.schlinkert@sellside.com',
url: 'https://github.com/jonschlinkert'
});
console.log(authors);
//=> 'Jon Schlinkert <jon.schlinkert@sellside.com> (https://github.com/jonschlinkert)'
Any of the properties can be used or missing:
var authors = [
{name: 'Brian Woodward', url: 'https://github.com/doowb'},
{name: 'Jon Schlinkert', url: 'https://github.com/jonschlinkert'}
];
console.log(authors.map(stringify));
//=> [ 'Brian Woodward (https://github.com/doowb)', 'Jon Schlinkert (https://github.com/jonschlinkert)' ]
author
string into an object following npm conventions. | homepagename
, email
and url
properties following npm conventions.… more | homepagename
, email
and url
properties following… more | homepageInstall dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on November 22, 2015.
© 2010 - cnpmjs.org x YWFE | Home | YWFE