{"name":"le-table","version":"7.0.1","keywords":["table","ascii","node","cli"],"author":{"url":"https://ionicabizau.net","name":"Ionică Bizău","email":"bizauionica@gmail.com"},"license":"MIT","_id":"le-table@7.0.1","maintainers":[{"name":"ionicabizau","email":"bizauionica@gmail.com"}],"contributors":[{"name":"Adam Paszke","email":"gracz1500@gmail.com"}],"homepage":"https://github.com/IonicaBizau/le-table","bugs":{"url":"https://github.com/IonicaBizau/le-table/issues"},"blah":{"h_img":"http://i.imgur.com/BKXaFAa.png","ex_img":"http://i.imgur.com/DwyCfWo.png"},"dist":{"shasum":"f0b4afd9de114f80a36bfcf9015ce76f9def5eaf","tarball":"http://registry-npm.ywwl.com/le-table/download/le-table-7.0.1.tgz","fileCount":4,"integrity":"sha512-CYAiXuSzXwusRq9D3iCnn5j6vsHm1CsOWVeWZ2IPpbpkJYsSgaPpucRdWnRVHLGmNsJq3Q5K2JUJrMstY0VBgw==","signatures":[{"sig":"MEYCIQCIlribzmxD53+VSJ/x5IruibiWeIiaduw/YH8AmdmDjwIhALtAVsTX8CYtNOZJitb/76njyA2R6RhQO66CQIK+gP/R","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11417,"size":3936,"noattachment":false,"key":"/le-table/-/le-table-7.0.1.tgz"},"main":"lib/index.js","gitHead":"093f7dfa364efc542af1f4bd6ab746c721bc5710","scripts":{"test":"node example"},"_npmUser":{"name":"ionicabizau","email":"bizauionica@gmail.com"},"repository":{"url":"git+ssh://git@github.com/IonicaBizau/le-table.git","type":"git"},"_npmVersion":"11.4.2","description":"Another NodeJS module for creating ASCII tables.","directories":{"test":"test"},"_nodeVersion":"24.4.1","dependencies":{"ul":"^5.2.1","cli-box":"^6.0.0","overlap":"^2.2.1","ansi-parser":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/le-table_7.0.1_1774253073364_0.8121192927196434","host":"s3://npm-registry-packages-npm-production"},"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":1774253073551,"_cnpm_publish_time":1774253073551,"dist-tags":{"latest":"9.0.0"}}