{"id":15690264,"url":"https://github.com/doowb/format-people","last_synced_at":"2025-05-07T23:44:47.237Z","repository":{"id":57159395,"uuid":"67816442","full_name":"doowb/format-people","owner":"doowb","description":"Format a list of authors, contributors, or collaborators.","archived":false,"fork":false,"pushed_at":"2018-08-14T16:55:36.000Z","size":19,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T23:44:39.809Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doowb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-09T16:55:08.000Z","updated_at":"2021-04-12T21:53:23.000Z","dependencies_parsed_at":"2022-09-08T11:03:31.009Z","dependency_job_id":null,"html_url":"https://github.com/doowb/format-people","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fformat-people","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fformat-people/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fformat-people/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fformat-people/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/format-people/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252973616,"owners_count":21834105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T18:08:26.828Z","updated_at":"2025-05-07T23:44:47.215Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# format-people [![NPM version](https://img.shields.io/npm/v/format-people.svg?style=flat)](https://www.npmjs.com/package/format-people) [![NPM monthly downloads](https://img.shields.io/npm/dm/format-people.svg?style=flat)](https://npmjs.org/package/format-people) [![NPM total downloads](https://img.shields.io/npm/dt/format-people.svg?style=flat)](https://npmjs.org/package/format-people) [![Linux Build Status](https://img.shields.io/travis/doowb/format-people.svg?style=flat\u0026label=Travis)](https://travis-ci.org/doowb/format-people)\n\n\u003e Format a list of authors, contributors, or collaborators.\n\nPlease consider following this project's author, [Brian Woodward](https://github.com/doowb), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save format-people\n```\n\n## Usage\n\nRequires Node.js v8.0 or higher.\n\n```js\nconst format = require('format-people');\n```\n\n## API\n\n**Params**\n\n* `arr` **{Array}**: Array of people objects.\n* `format` **{String}**: The format \"type\" to use. Valid types are `table`, `list` and `aligned`. If no type is passed, `table` will be used automatically.\n* `returns` **{String}**: Formatted\n\n**Example**\n\n```js\nconst people = [ { name: 'Brian Woodward' } ];\nconst table = format(people, 'table');\nconsole.log(table);\n```\n\n### [.table](index.js#L41)\n\nReturns the array of people formatted as a markdown table.\n\n**Params**\n\n* `arr` **{Array}**: Array of people to format.\n* `returns` **{String}**: Markdown table\n\n**Example**\n\n```js\nconst people = [\n  { login: 'doowb', contributions: 100, html_url: 'https://github.com/doowb' },\n  { login: 'jonschlinkert', contributions: 50, html_url: 'https://github.com/jonschlinkert' }\n];\nconsole.log(format.table(people));\n//=\u003e | **Commits** | **Contributor**\u003cbr/\u003e |\n//=\u003e | --- | --- |\n//=\u003e | 100 | [doowb](https://github.com/doowb) |\n//=\u003e | 50 | [jonschlinkert](https://github.com/jonschlinkert) |\n```\n\n### [.list](index.js#L84)\n\nReturns the array of people formatted as a markdown list.\n\n**Params**\n\n* `arr` **{Array}**: Array of people to format.\n* `returns` **{String}**: Markdown list\n\n**Example**\n\n```js\nconst people = [\n  { login: 'doowb', contributions: 100, html_url: 'https://github.com/doowb' },\n  { login: 'jonschlinkert', contributions: 50, html_url: 'https://github.com/jonschlinkert' }\n];\nconsole.log(format.list(people));\n//=\u003e **Commits** / **Contributor**\n//=\u003e + 100 [doowb](https://github.com/doowb)\n//=\u003e + 50 [jonschlinkert](https://github.com/jonschlinkert)\n```\n\n### [.aligned](index.js#L124)\n\nReturns the array of people formatted as a GitHub Flavored Markdown fenced code block, with aligned columns.\n\n**Params**\n\n* `arr` **{Array}**: Array of people to format.\n* `returns` **{String}**: Markdown code block with aligned columns.\n\n**Example**\n\n```js\nconst people = [\n  { login: 'doowb', contributions: 100, html_url: 'https://github.com/doowb' },\n  { login: 'jonschlinkert', contributions: 50, html_url: 'https://github.com/jonschlinkert' }\n];\nconsole.log(format.aligned(people));\n//=\u003e COMMITS / CONTRIBUTOR\n//=\u003e ------- | -----------\n//=\u003e 100      doowb\n//=\u003e 50      jonschlinkert\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [github-base](https://www.npmjs.com/package/github-base): Low-level methods for working with the GitHub API in node.js/JavaScript. | [homepage](https://github.com/jonschlinkert/github-base \"Low-level methods for working with the GitHub API in node.js/JavaScript.\")\n* [github-contributors](https://www.npmjs.com/package/github-contributors): Generate a markdown or JSON list of contributors for a project using the GitHub API. | [homepage](https://github.com/jonschlinkert/github-contributors \"Generate a markdown or JSON list of contributors for a project using the GitHub API.\")\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 11 | [doowb](https://github.com/doowb) |\n| 8 | [jonschlinkert](https://github.com/jonschlinkert) |\n\n### Author\n\n**Brian Woodward**\n\n* [GitHub Profile](https://github.com/doowb)\n* [Twitter Profile](https://twitter.com/doowb)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Brian Woodward](https://github.com/doowb).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 14, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fformat-people","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fformat-people","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fformat-people/lists"}