{"name":"asciitable","version":"0.0.7","description":"Render tables in text for tabular terminal fun times!","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git://github.com/deoxxa/asciitable.git"},"keywords":["ascii","table","render","console","terminal","text"],"author":{"name":"Conrad Pankoff","email":"deoxxa@fknsrs.biz","url":"http://www.fknsrs.biz/"},"license":"BSD","readme":"asciitable\n==========\n\nRender tables in text for tabular terminal fun times!\n\nOverview\n--------\n\nasciitable is the result of me extracting some code from another project. It can\nrender simple tables with headings and pretty hyphen/pipe character-based\nformatting.\n\nInstallation\n------------\n\nAvailable via [npm](http://npmjs.org/):\n\n> $ npm install asciitable\n\nOr via git:\n\n> $ git clone git://github.com/deoxxa/asciitable.git node_modules/asciitable\n\nAPI\n---\n\n**asciitable**\n\nGenerates a table! Easy as pie!\n\n```javascript\nvar table = asciitable(options, data);\n\n// OR\n\nvar table = asciitable(data, options);\n\n// OR\n\nvar table = asciitable(data);\n```\n\n```javascript\n// basic table\nvar table = asciitable([\n  {a: \"a\", b: \"b\", c: \"c\"},\n  {a: \"asddsfa\", b: \"sss\", c: \"zxc\"},\n  {a: \"dsgvdgsdvgssdf\", b: \"x\", c: \"eryty\"},\n  {a: \"m\", b: \"n\", c: \"o\", d: \"p\"},\n]);\n\nconsole.log(table);\n\n// pretty table\nvar table = asciitable([\n  {a: \"a\", b: \"b\", c: \"c\"},\n  {a: \"asddsfa\", b: \"sss\", c: \"zxc\"},\n  {a: \"dsgvdgsdvgssdf\", b: \"x\", c: \"eryty\"},\n  {a: \"m\", b: \"n\", c: \"o\", d: \"p\"},\n], {\n  skinny: true,\n  intersectionCharacter: \"@\",\n});\n```\n\nArguments\n\n* _options_ - an object specifying some things about the table you want\n  generated. Options are optional.\n* _data_ - an array of objects.\n\nOptions\n\n* _fields_ - an array of field names you want to display. If omitted, asciitable\n  will try to figure out what all the fields are for all the objects in the data\n  array.\n* _intersectionCharacter_ - changes what character to use at points where lines\n  intersect. The default is \"-\".\n* _skinny_ - trims the \"hanging\" characters used in the layout. Saves you two\n  horizontal characters!\n\nExample\n-------\n\nAlso see [example.js](https://github.com/deoxxa/pillion/blob/master/example.js).\n\n```javascript\nvar asciitable = require(\"asciitable\");\n\nvar options = {\n  skinny: true,\n  intersectionCharacter: \"x\",\n  columns: [\n    {field: \"ab\", name: \"First\"},\n    {field: \"b\",  name: \"Second\"},\n    {field: \"c\",  name: \"Third\"},\n    {field: \"de\", name: \"Fourth\"},\n  ],\n};\n\nvar table = asciitable(options, [\n  {ab: \"a\",              b: \"b\",   c: \"c\"            },\n  {ab: \"asddsfa\",        b: \"sss\", c: \"zxc\"          },\n  {ab: \"dsgvdgsdvgssdf\", b: \"x\",   c: \"eryty\"        },\n  {ab: \"m\",              b: \"n\",   c: \"o\",    de: \"p\"},\n  {ab: 5,                b: null,  c: {},     de: [] },\n  {ab: function(){}},\n]);\n\nconsole.log(table);\n```\n\nOutput:\n\n```\nx----------------x--------x-----------------x--------x\n| First          | Second | Third           | Fourth |\nx----------------x--------x-----------------x--------x\n| a              | b      | c               |        |\n| asddsfa        | sss    | zxc             |        |\n| dsgvdgsdvgssdf | x      | eryty           |        |\n| m              | n      | o               | p      |\n| 5              | null   | [object Object] |        |\n| function (){}  |        |                 |        |\nx----------------x--------x-----------------x--------x\n```\n\nLicense\n-------\n\n3-clause BSD. A copy is included with the source.\n\nContact\n-------\n\n* GitHub ([deoxxa](http://github.com/deoxxa))\n* Twitter ([@deoxxa](http://twitter.com/deoxxa))\n* ADN ([@deoxxa](https://alpha.app.net/deoxxa))\n* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz))\n","readmeFilename":"README.md","_id":"asciitable@0.0.7","dist":{"shasum":"7bccc44598e61e192a800b725c0612a1b177a56e","tarball":"https://registry.npmjs.org/asciitable/-/asciitable-0.0.7.tgz","integrity":"sha512-UnEiXHCR4PieLMlVydDVIqsNHNqg4VApNvpmzd5wmipQ6ZpEhfLG3cGVquzPaxrGI/BK5eKjxIAgGylwAIxHpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGIZ9lX0gx57ljvfqaIZTTb3gOj13lQuJ4g9gBYf6MVUAiEAjFNTd0lpb2NqeXVwKhRK734oNZgI/aAoww211EralpU="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"deoxxa","email":"deoxxa@fknsrs.biz"},"maintainers":[{"name":"deoxxa","email":"deoxxa@fknsrs.biz"}]}