1. stringify-author
Stringify an authors object to `name <email> (url)`.
stringify-author
Package: stringify-author
Created by: jonschlinkert
Last modified: Mon, 27 Jun 2022 01:09:50 GMT
Version: 0.1.3
License: MIT
Downloads: 245,613
Repository: https://github.com/jonschlinkert/stringify-author

Install

npm install stringify-author
yarn add stringify-author

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

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.

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code