stringify-author

v0.1.3
Stringify an authors object to `name <email> (url)`.
author authors name package parse person pkg stringify toString and 2 more...

stringify-author NPM version Build Status

Stringify an authors object to name <email> (url).

Install

Install with npm

$ npm i stringify-author --save

Usage

var stringify = require('stringify-author');

var authors = stringify({
  name: 'Jon Schlinkert',
  email: '[email protected]',
  url: 'https://github.com/jonschlinkert'
});

console.log(authors);
//=> 'Jon Schlinkert <[email protected]> (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)' ]

Similar or related projects

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on November 22, 2015.

npm i stringify-author

Metadata

  • MIT
  • >=0.10.0
  • Jon Schlinkert
  • released 11/22/2015

Downloads