{"name":"le-table","version":"9.0.0","description":"Another NodeJS module for creating ASCII tables.","main":"lib/index.js","scripts":{"test":"node example"},"repository":{"type":"git","url":"git+ssh://git@github.com/IonicaBizau/le-table.git"},"contributors":[{"name":"Adam Paszke","email":"gracz1500@gmail.com"}],"keywords":["table","ascii","node","cli"],"author":{"name":"Ionică Bizău","email":"bizauionica@gmail.com","url":"https://ionicabizau.net"},"license":"MIT","bugs":{"url":"https://github.com/IonicaBizau/le-table/issues"},"homepage":"https://github.com/IonicaBizau/le-table","directories":{"test":"test"},"dependencies":{"ansi-parser":"^3.2.1","cli-box":"^6.0.0","overlap":"^2.2.1","ul":"^5.2.1"},"blah":{"h_img":"http://i.imgur.com/BKXaFAa.png","ex_img":"http://i.imgur.com/DwyCfWo.png"},"devDependencies":{},"_id":"le-table@9.0.0","gitHead":"b5f69fe1bd8a7e5c746a776b16d5577ea237d06a","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-IFSlj4dl+MRB3d1UxitcJR+rWYzTVJwdWevH4HUSMYL+AbkL6B9SR6F3DMCZg/3pcmlwmIQLXf6K2XgCo+LQRw==","shasum":"2a94029f9107e3511ca09328fdc1d56fb148bce8","tarball":"http://registry-npm.ywwl.com/le-table/download/le-table-9.0.0.tgz","fileCount":4,"unpackedSize":11434,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCFWxGr42YXFuZWib8SzEo4D1HVYNy+jdYZscznuexP0gIhALwbA6IIJQvGwofduIi7+q8EYWQCPUaXMLOoCtw+dg/P"}],"size":3927,"noattachment":false,"key":"/le-table/-/le-table-9.0.0.tgz"},"_npmUser":{"name":"ionicabizau","email":"bizauionica@gmail.com"},"maintainers":[{"name":"ionicabizau","email":"bizauionica@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/le-table_9.0.0_1774253267067_0.5106859574726954"},"_hasShrinkwrap":false,"readme":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n![le-table](http://i.imgur.com/BKXaFAa.png)\n\n\n\n\n# le-table\n\nAnother NodeJS module for creating ASCII tables.\n\n\n![le-table](http://i.imgur.com/DwyCfWo.png)\n\n\n\n## Installation\n\n```sh\n$ npm i le-table\n```\n\n\n\n\n\n\n\n\n\n## Example\n\n\n\n\n\n\n```js\n\"use strict\";\n\nconst Table = require(\"le-table\");\n\n// Table data\nconst data = [\n    [\"Cell 1.1\", \"Cell 2.1\", \"Cell 3.1\"],\n    [\"Cell 1.2\", {\n        text: \"Multi\\nline\\n\\u001b[34mcell\\ncontent that\\u001b[0m is\\n left aligned.\",\n        data: {\n            hAlign: \"left\",\n        }\n    }, \"Cell 3.2\"],\n    [\"Cell 1.3\", \"Cell 2.3\", \"Cell 3.3\"],\n    [\"Cell 1.4\", \"Cell 2.4\", \"Cell 3.4\"]\n];\n\n// Create table instance\nconst myTable = new Table({\n    cell: {\n        padding: { left: 4, right: 4} // adds 2 spaces to both sides of every cell\n    }\n});\n\n// Push data\nfor (let i = 0; i < data.length; ++i) {\n    myTable.addRow([i].concat(data[i]), {\n        hAlign: i > 2 ? \"left\": \"right\"\n    });\n}\n\n// Output table\nconsole.log(myTable.stringify());\n\n```\n\n\n\n\n\n\n## Documentation\n\n\n\n\n\n### `LeTable(options)`\nCreates a new instance of `LeTable`.\n\n#### Params\n- **Object** `options`: An object containing the table configuration:\n  - `cell`: object containing\n    - `hAlign` (default: `\"center\"`): One of the following values: `\"left\"`, `\"center\"` and `\"right\"`\n    - `vAlign` (default: `\"middle\"`): One of the following values: `\"top\"`, `\"middle\"` and `\"bottom\"`\n    - `autoEOL` (default: `true`): if true, the lines are wrapped inside of the cell\n    - `stretch` (default: `true`): if true, the size of the box will not be fixed\n  - `marks`: object containing the mark characters (see example)\n  - `noAnsi` (Boolean): If you want to disable ANSI characters in the output.\n\n#### Return\n- **LeTable** The `LeTable` instance.\n\n### `addRow(columns, ops)`\nAdds a new row in table.\n\n#### Params\n- **Array** `columns`: Row data (as array)\n- **Object** `ops`: Options for cell content\n\n#### Return\n- **LeTable** The `LeTable` instance.\n\n### `stringify()`\nStringifies the table.\n\n#### Return\n- **String** The stringified table\n\n\n\n\n\n\n## How to contribute\nHave an idea? Found a bug? See [how to contribute][contributing].\n\n\n\n## License\nSee the [LICENSE][license] file.\n\n\n[license]: /LICENSE\n[contributing]: /CONTRIBUTING.md\n[docs]: /DOCUMENTATION.md\n","publish_time":1774253267212,"_cnpm_publish_time":1774253267212,"dist-tags":{"latest":"9.0.0"}}