{"_id":"terminal-table","_rev":"1320066","name":"terminal-table","description":"View a table in the terminal.","dist-tags":{"latest":"0.0.12"},"maintainers":[{"name":"zaftzaft","email":"zaftzaft7@gmail.com"}],"time":{"modified":"2021-10-25T05:51:38.000Z","created":"2015-04-01T14:26:56.514Z","0.0.12":"2015-04-07T06:48:03.245Z","0.0.11":"2015-04-06T09:35:14.170Z","0.0.10":"2015-04-06T09:03:11.990Z","0.0.9":"2015-04-03T09:44:17.460Z","0.0.8":"2015-04-02T01:33:42.549Z","0.0.7":"2015-04-01T14:29:49.926Z","0.0.6":"2015-04-01T14:26:56.514Z"},"users":{"goliatone":true},"author":{"name":"@zaftzaft"},"repository":{"type":"git","url":"https://github.com/zaftzaft/terminal-table.git"},"versions":{"0.0.12":{"name":"terminal-table","version":"0.0.12","description":"View a table in the terminal.","main":"index.js","dependencies":{"colors":"^1.0.3","eastasianwidth":"^0.1.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["terminal","cli"],"repository":{"type":"git","url":"https://github.com/zaftzaft/terminal-table.git"},"author":{"name":"@zaftzaft"},"license":"MIT","gitHead":"607643c7d02e1d86367805463180ba78a2129848","bugs":{"url":"https://github.com/zaftzaft/terminal-table/issues"},"homepage":"https://github.com/zaftzaft/terminal-table","_id":"terminal-table@0.0.12","_shasum":"7b56d009aa6828dfdd10f11b654e79c062965fa2","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"zaftzaft","email":"zaftzaft7@gmail.com"},"maintainers":[{"name":"zaftzaft","email":"zaftzaft7@gmail.com"}],"dist":{"shasum":"7b56d009aa6828dfdd10f11b654e79c062965fa2","size":41212,"noattachment":false,"key":"/terminal-table/-/terminal-table-0.0.12.tgz","tarball":"http://registry.cnpm.dingdandao.com/terminal-table/download/terminal-table-0.0.12.tgz"},"directories":{},"publish_time":1428389283245,"_cnpm_publish_time":1428389283245,"_hasShrinkwrap":false},"0.0.11":{"name":"terminal-table","version":"0.0.11","description":"View a table in the terminal.","main":"index.js","dependencies":{"colors":"^1.0.3","eastasianwidth":"^0.1.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["terminal","cli"],"repository":{"type":"git","url":"https://github.com/zaftzaft/terminal-table.git"},"author":{"name":"@zaftzaft"},"license":"MIT","gitHead":"51c3bace3baac5abc4da777b8e0b7c91874a5e37","bugs":{"url":"https://github.com/zaftzaft/terminal-table/issues"},"homepage":"https://github.com/zaftzaft/terminal-table","_id":"terminal-table@0.0.11","_shasum":"06b2cbe5fc576c0d6d1d96950ea319e9f65bcfdf","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"zaftzaft","email":"zaftzaft7@gmail.com"},"maintainers":[{"name":"zaftzaft","email":"zaftzaft7@gmail.com"}],"dist":{"shasum":"06b2cbe5fc576c0d6d1d96950ea319e9f65bcfdf","size":40746,"noattachment":false,"key":"/terminal-table/-/terminal-table-0.0.11.tgz","tarball":"http://registry.cnpm.dingdandao.com/terminal-table/download/terminal-table-0.0.11.tgz"},"directories":{},"publish_time":1428312914170,"_cnpm_publish_time":1428312914170,"_hasShrinkwrap":false},"0.0.10":{"name":"terminal-table","version":"0.0.10","description":"View a table in the terminal.","main":"index.js","dependencies":{"colors":"^1.0.3","eastasianwidth":"^0.1.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["terminal","cli"],"repository":{"type":"git","url":"https://github.com/zaftzaft/terminal-table.git"},"author":{"name":"@zaftzaft"},"license":"MIT","gitHead":"e9a41a192a085aac964f912a1e5f42b61ed8ae7f","bugs":{"url":"https://github.com/zaftzaft/terminal-table/issues"},"homepage":"https://github.com/zaftzaft/terminal-table","_id":"terminal-table@0.0.10","_shasum":"27367627d9a0868e21a18053f65b32cbf3e59c07","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"zaftzaft","email":"zaftzaft7@gmail.com"},"maintainers":[{"name":"zaftzaft","email":"zaftzaft7@gmail.com"}],"dist":{"shasum":"27367627d9a0868e21a18053f65b32cbf3e59c07","size":40613,"noattachment":false,"key":"/terminal-table/-/terminal-table-0.0.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/terminal-table/download/terminal-table-0.0.10.tgz"},"directories":{},"publish_time":1428310991990,"_cnpm_publish_time":1428310991990,"_hasShrinkwrap":false},"0.0.9":{"name":"terminal-table","version":"0.0.9","description":"View a table in the terminal.","main":"index.js","dependencies":{"colors":"^1.0.3","eastasianwidth":"^0.1.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["terminal","cli"],"repository":{"type":"git","url":"https://github.com/zaftzaft/terminal-table.git"},"author":{"name":"@zaftzaft"},"license":"MIT","gitHead":"da19affa0b423216882afd237fc6aaab5023b7f1","bugs":{"url":"https://github.com/zaftzaft/terminal-table/issues"},"homepage":"https://github.com/zaftzaft/terminal-table","_id":"terminal-table@0.0.9","_shasum":"644b948c8fe0441cfbb43c0a9b4bff4fb04a4253","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"zaftzaft","email":"zaftzaft7@gmail.com"},"maintainers":[{"name":"zaftzaft","email":"zaftzaft7@gmail.com"}],"dist":{"shasum":"644b948c8fe0441cfbb43c0a9b4bff4fb04a4253","size":40042,"noattachment":false,"key":"/terminal-table/-/terminal-table-0.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/terminal-table/download/terminal-table-0.0.9.tgz"},"directories":{},"publish_time":1428054257460,"_cnpm_publish_time":1428054257460,"_hasShrinkwrap":false},"0.0.8":{"name":"terminal-table","version":"0.0.8","description":"View a table in the terminal.","main":"index.js","dependencies":{"colors":"^1.0.3","eastasianwidth":"^0.1.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["terminal","cli"],"repository":{"type":"git","url":"https://github.com/zaftzaft/terminal-table.git"},"author":{"name":"@zaftzaft"},"license":"MIT","gitHead":"17ae6fe60bae2fc6cf7e85f41ab662af44c40193","bugs":{"url":"https://github.com/zaftzaft/terminal-table/issues"},"homepage":"https://github.com/zaftzaft/terminal-table","_id":"terminal-table@0.0.8","_shasum":"725f98fea778cbb274093e765fcb31cc4aa67dae","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"zaftzaft","email":"zaftzaft7@gmail.com"},"maintainers":[{"name":"zaftzaft","email":"zaftzaft7@gmail.com"}],"dist":{"shasum":"725f98fea778cbb274093e765fcb31cc4aa67dae","size":40004,"noattachment":false,"key":"/terminal-table/-/terminal-table-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/terminal-table/download/terminal-table-0.0.8.tgz"},"directories":{},"publish_time":1427938422549,"_cnpm_publish_time":1427938422549,"_hasShrinkwrap":false},"0.0.7":{"name":"terminal-table","version":"0.0.7","description":"View a table in the terminal.","main":"index.js","dependencies":{"colors":"^1.0.3","eastasianwidth":"^0.1.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["terminal","cli"],"repository":{"type":"git","url":"https://github.com/zaftzaft/terminal-table.git"},"author":{"name":"@zaftzaft"},"license":"MIT","gitHead":"6a45d48bd4378f1ec2bf3826e8576c322fa6c64b","bugs":{"url":"https://github.com/zaftzaft/terminal-table/issues"},"homepage":"https://github.com/zaftzaft/terminal-table","_id":"terminal-table@0.0.7","_shasum":"70ed60046d347374e1c880379eb3703c2a0d8aa0","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"zaftzaft","email":"zaftzaft7@gmail.com"},"maintainers":[{"name":"zaftzaft","email":"zaftzaft7@gmail.com"}],"dist":{"shasum":"70ed60046d347374e1c880379eb3703c2a0d8aa0","size":26277,"noattachment":false,"key":"/terminal-table/-/terminal-table-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/terminal-table/download/terminal-table-0.0.7.tgz"},"directories":{},"publish_time":1427898589926,"_cnpm_publish_time":1427898589926,"_hasShrinkwrap":false},"0.0.6":{"name":"terminal-table","version":"0.0.6","description":"View a table in the terminal.","main":"index.js","dependencies":{"colors":"^1.0.3","eastasianwidth":"^0.1.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["terminal","cli"],"repository":{"type":"git","url":"https://github.com/zaftzaft/terminal-table.git"},"author":{"name":"@zaftzaft"},"license":"MIT","gitHead":"7e35dc48305e8cadb3eb5bf7dfe0d2fd25ef1b5b","bugs":{"url":"https://github.com/zaftzaft/terminal-table/issues"},"homepage":"https://github.com/zaftzaft/terminal-table","_id":"terminal-table@0.0.6","_shasum":"9492dfe9de74f46aade589f612ac9fa4eddf23af","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"zaftzaft","email":"zaftzaft7@gmail.com"},"maintainers":[{"name":"zaftzaft","email":"zaftzaft7@gmail.com"}],"dist":{"shasum":"9492dfe9de74f46aade589f612ac9fa4eddf23af","size":26275,"noattachment":false,"key":"/terminal-table/-/terminal-table-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/terminal-table/download/terminal-table-0.0.6.tgz"},"directories":{},"publish_time":1427898416514,"_cnpm_publish_time":1427898416514,"_hasShrinkwrap":false}},"readme":"terminal-table\n==============\nView a table in the terminal\n\n![screenshot](https://raw.githubusercontent.com/zaftzaft/terminal-table/master/img/screenshot.png)\n\n\n## Features\n- To fit the width of the terminal can be displayed\n- Centered, right-justified\n- Corresponding to the full-width [eastasianwidth](https://github.com/komagata/eastasianwidth)\n- Coloring is possible [colors.js](https://github.com/marak/colors.js)\n- Border can choose from three styles and user custom style.\n\n\n## Installation\n```bash\n$ npm i terminal-table\n```\n\n## Usage\n``` js\nvar Table = require(\"terminal-table\");\nvar t = new Table();\n\nt.push(\n  [\"First\", \"Second\"],\n  [\"Foo\", \"Bar\"]\n);\n\nconsole.log(\"\" + t);\n```\n\n## API\n\n### Constructor options\n- borderStyle\n  - 1: ascii  \n  ![screenshot](https://raw.githubusercontent.com/zaftzaft/terminal-table/master/img/border-style-1.png)\n  - 2: unicode  \n  ![screenshot](https://raw.githubusercontent.com/zaftzaft/terminal-table/master/img/border-style-2.png)\n  - 3: unicode bold  \n  ![screenshot](https://raw.githubusercontent.com/zaftzaft/terminal-table/master/img/border-style-3.png)\n  - 0: user custom\n  ``` js\n    var t = new Table({\n      borderStyle: 0,\n      border: {\n        sep: \"║\",\n        topLeft: \"╔\", topMid: \"╦\", top: \"═\", topRight: \"╗\",\n        midLeft: \"╠\", midMid: \"╬\", mid: \"═\", midRight: \"╣\",\n        botLeft: \"╚\", botMid: \"╩\", bot: \"═\", botRight: \"╝\"\n      }\n    });\n  ```\n- horizontalLine - Boolean\n- width - Array\n``` js\nnew Table({\n  width: [10, \"50%\", \"50%\"]\n});\n```\n- leftPadding, rightPadding\n\n\n\n### Methods\n- push([\"item\", \"item2\",,,],,,)\n- cell(row, column, text)\n- insertRow(rowIndex, [\"item\", ...])\n- insertColumn(columnIndex, [\"item\", ...])\n- attr(row, column, { attrs })\n  - __attrs__\n  - align: `left`, `center`, `right`\n  - color: from colors.js, e.g. `blue`, `red`...\n  - bg: `blue`, `black`...\n- attrRange({ range }, { attrs })\n  - __range__\n  - row: [start, end]\n  - column: [start, end]\n- removeCell(row, column)\n- removeRow(row)\n- removeColumn(column)\n","_attachments":{},"homepage":"https://github.com/zaftzaft/terminal-table","bugs":{"url":"https://github.com/zaftzaft/terminal-table/issues"},"license":"MIT"}