stringify-author
Stringify an authors object to `name <email> (url)`.
Last updated 9 years ago by jonschlinkert .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install stringify-author 
SYNC missed versions from official npm registry.

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: '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)' ]

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.

Current Tags

  • 0.1.3                                ...           latest (9 years ago)

4 Versions

  • 0.1.3                                ...           9 years ago
  • 0.1.2                                ...           9 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (2)
Downloads
Total 3
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE