Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stringify-author

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stringify-author

Stringify an authors object to `name (url)`.

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20K
decreased by-45.77%
Maintainers
2
Weekly downloads
 
Created
Source

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)' ]
  • author-regex: Regular expression for parsing an author string into an object following npm conventions. | homepage
  • parse-author: Parse a string into an object with name, email and url properties following npm conventions.… more | homepage
  • parse-authors: Parse a string into an array of objects with name, email and url properties following… more | homepage
  • stringify-authors: Converts an author object or array of author objects into an array of strings. Useful… more | homepage

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.

Keywords

FAQs

Package last updated on 22 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc