{"id":17978352,"url":"https://github.com/ad-si/tabledown","last_synced_at":"2026-05-10T07:42:48.914Z","repository":{"id":57376314,"uuid":"55869853","full_name":"ad-si/tabledown","owner":"ad-si","description":"Easily create Markdown and ASCII tables in JavaScript. Including CLI tool to pretty print JSON as tables.","archived":false,"fork":false,"pushed_at":"2017-06-29T19:14:25.000Z","size":19,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T06:02:56.088Z","etag":null,"topics":["ascii-art","cli","javascript","json","markdown","pretty-print","table"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ad-si.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-09T22:34:21.000Z","updated_at":"2024-06-17T18:05:21.000Z","dependencies_parsed_at":"2022-09-06T05:30:27.836Z","dependency_job_id":null,"html_url":"https://github.com/ad-si/tabledown","commit_stats":null,"previous_names":["adius/tabledown"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Ftabledown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Ftabledown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Ftabledown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Ftabledown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ad-si","download_url":"https://codeload.github.com/ad-si/tabledown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246911492,"owners_count":20853656,"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":["ascii-art","cli","javascript","json","markdown","pretty-print","table"],"created_at":"2024-10-29T17:33:19.929Z","updated_at":"2025-10-28T02:11:32.823Z","avatar_url":"https://github.com/ad-si.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tabledown\n\nEasily create markdown tables in your Javascript applications.\n\n\n## Features\n\n- Input data format agnostic\n  - Array of arrays\n  - Array of objects\n- Support for several markdown flavors\n  - Simple tables\n  - Multiline tables\n  - Grid tables\n  - Pipe tables\n- Column alignment\n- Custom headers\n- Optional caption\n\n\n## Installation\n\nAs command line tool:\n\n```sh\nnpm install --global tabledown\n```\n\nAs module:\n\n```sh\nnpm install --save tabledown\n```\n\n\n## Usage\n\n### Command Line\n\n```sh\necho '[{\"name\": \"John\", \"age\": 32}, {\"name\": \"Anna\", \"age\": 27}]' | tabledown\n```\n\nyields\n\n```txt\nname | age\n-----|----\nJohn | 32\nAnna | 27\n```\n\n\n### Module\n\n#### Simple\n\n```js\nimport Tabledown from 'tabledown'\nconst food = [\n  {\n    name: 'banana',\n    color: 'yellow',\n    price: 3.23,\n    quantity: 2,\n  },\n  {\n    name: 'tomato',\n    color: 'red',\n    price: 2.67,\n    quantity: 6,\n  }\n]\n\nconst table = new Tabledown({data: food})\n\nconsole.log(table.toString())\n```\n\nyields\n\n```md\nname   |  color | price | quantity\n-------|--------|-------|---------\nbanana | yellow | 3.23  |    2\ntomato |    red | 2.67  |    6\n```\n\n\n#### Extended\n\n```js\nimport Tabledown from 'tabledown'\nconst food = [\n  {\n    name: 'banana',\n    color: 'yellow',\n    price: 3.23,\n    quantity: 2,\n  },\n  {\n    name: 'tomato',\n    color: 'red',\n    price: 2.67,\n    quantity: 6,\n  },\n  {\n    name: 'cucumber',\n    color: 'green',\n    price: 5.82,\n    quantity: 4,\n  },\n  {\n    name: 'carrot',\n    color: 'orange',\n    price: 3,\n    quantity: 9,\n  }\n]\n\nconst table = new Tabledown({\n  caption: 'Food',\n  data: food,\n  alignments: {\n    name: 'left',\n    color: 'right',\n    price: 'decimal mark', // Not yet implemented\n    quantity: 'center',\n  },\n  headerTexts: {\n    name: 'the Fruit',\n    color: 'the Color',\n    price: 'the Price (€)',\n    quantity: 'the Quantity',\n  },\n  style: 'pipe', // or simple, multiline, grid (not yet implemented)\n  capitalizeHeaders: true,\n})\n\nconsole.log(table.toString())\n```\n\nyields\n\n```md\nTable: Food\n\nThe Fruit | The Color | The Price (€) | The Quantity\n:---------|----------:|---------------|:-----------:\nbanana    |    yellow | 3.23          |      2\ntomato    |       red | 2.5           |      6\ncucumber  |     green | 5.82          |      4\ncarrot    |    orange | 12            |      9\n```\n\nThe data can also be provided as an array.\nThe first sub-array must contain the headers.\n\n```js\nconst food = [\n  ['name',     'color', 'price', 'quantity'],\n  ['banana',   'yellow',  3.23,      2     ],\n  ['tomato',   'red',     2.5 ,      6     ],\n  ['cucumber', 'green',   5.82,      4     ],\n  ['carrot',   'orange', 12,         9     ],\n]\n\nconst table = new Tabledown({data: food})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fad-si%2Ftabledown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fad-si%2Ftabledown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fad-si%2Ftabledown/lists"}