{"_id":"markdown-table-ts","_rev":"4-34bb025331f602c9f9007a2a0c81e404","name":"markdown-table-ts","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"markdown-table-ts","version":"1.0.0","keywords":["markdown","md","table","tables","ts"],"description":"A zero-dependency library for generating Markdown tables written in TypeScript.","main":"lib/src/index.js","types":"lib/src/index.d.ts","scripts":{"build":"tsc","lint":"eslint --ext '.ts' src test *.ts","test":"jest"},"homepage":"https://gitlab.com/jiri.hajek/markdown-table-ts","repository":{"type":"git","url":"https://gitlab.com/jiri.hajek/markdown-table-ts.git"},"bugs":{"url":"https://gitlab.com/jiri.hajek/markdown-table-ts/-/issues"},"author":{"name":"Jiri Hajek"},"license":"MIT","devDependencies":{"@types/jest":"^26.0.19","@typescript-eslint/eslint-plugin":"^4.11.0","@typescript-eslint/parser":"^4.11.0","eslint":"^7.16.0","eslint-config-airbnb-typescript":"^12.0.0","eslint-plugin-import":"^2.22.1","jest":"^26.6.3","ts-jest":"^26.4.4","ts-node":"^9.1.1","typescript":"^4.1.3"},"licenseText":"MIT License\n\nCopyright (c) 2020 Jiri Hajek\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"markdown-table-ts@1.0.0","dist":{"shasum":"f3ebc152c576086c7ee739a86a5ad620ddb6b6b7","integrity":"sha512-QIfdbqYUzN4jwwb7ypHzS/R0u84jcnmc0Fr6Vc9wXBtB5+9hEdfqCogaNEplYhvZRDL4BKs7kIAhmXa6/v4PxA==","tarball":"https://registry.npmjs.org/markdown-table-ts/-/markdown-table-ts-1.0.0.tgz","fileCount":8,"unpackedSize":14847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf64GeCRA9TVsSAnZWagAAep4P/RhmDUqrh72STXgkU4aQ\nip+ebMF+lQpu9oUyXxJBSP1KttGpF4HAJWfX0O3E2iw1Wo9arjBuqIIvYqVT\nc5DqcOCDyFFCfpTjUIovoVSnXxOjxNkmkqCePTk+Lh9N7f6jhmGZKTh0fOBK\nlZzLp8p2tXq86zSYdtq7d9iFClIMnz6Mu0Nz6AVgLu9R8JuyKLSemCrUOwr+\nfbSB+27ieum/3vzpgMdTh3aph3VU+PL+RysQyZn3xanRsempBBfLD7JHzfOu\nMLOAPHwSxYIWGv7gbeFhlrO+hwMiSQl0z9jDKr77TmW5kQwDuWTHBJljDtis\nTftiBP/FtO4xlRhiTK8XxcNIo4zcdQLYUS71HwGew6zkcYmINVO9v4sN82Kn\nnMK3KpVKWrOjVrmwyncHSkrZF07Vh2FukA3mqYN/bGkujADGyZKA6jOirmsj\nGNva5KZEKty3r8V0PGskiQ8k57YlC73eSw/g1KhAaUsudoOhNw72H9Pv7hOC\nNhhijKK1Wv8b0RKY24zK2794nEG7EDcZbblrE+o3SQcm0wjTV3iHiAHEAOEI\nbk1vzjFBS618h2q0a5D8DiTCCa4LBhMK+aDHnAuieXZyLEWXASY8TAHzI47w\nol26BSuYjSzapN0mrPmikJlmPWsaepfnrQ7wU14lDTc9Xz3Xv+AVWxA1A1Nj\nTYhb\r\n=XR+2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFioXWWRvmq4ShkcEFIi0XqVfDALKiVVAJwJvq2SKNNSAiEA+cdk2rKOt5HzTBkz7owNNnpDtEJZ9r4ZiZrOvmIcf7s="}]},"_npmUser":{"name":"jiri.hajek","email":"jiri.hajek18@gmail.com"},"directories":{},"maintainers":[{"name":"jiri.hajek","email":"jiri.hajek18@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-table-ts_1.0.0_1609269661857_0.5699158451886179"},"_hasShrinkwrap":false},"1.0.1":{"name":"markdown-table-ts","version":"1.0.1","keywords":["markdown","md","table","tables","ts"],"description":"A zero-dependency library for generating Markdown tables written in TypeScript.","main":"lib/src/index.js","types":"lib/src/index.d.ts","scripts":{"build":"tsc","lint":"eslint --ext '.ts' src test *.ts","test":"jest"},"homepage":"https://gitlab.com/jiri.hajek/markdown-table-ts","repository":{"type":"git","url":"https://gitlab.com/jiri.hajek/markdown-table-ts.git"},"bugs":{"url":"https://gitlab.com/jiri.hajek/markdown-table-ts/-/issues"},"author":{"name":"Jiri Hajek"},"license":"MIT","devDependencies":{"@types/jest":"^26.0.19","@typescript-eslint/eslint-plugin":"^4.11.0","@typescript-eslint/parser":"^4.11.0","eslint":"^7.16.0","eslint-config-airbnb-typescript":"^12.0.0","eslint-plugin-import":"^2.22.1","jest":"^26.6.3","ts-jest":"^26.4.4","ts-node":"^9.1.1","typescript":"^4.1.3"},"licenseText":"MIT License\n\nCopyright (c) 2020 Jiri Hajek\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"markdown-table-ts@1.0.1","dist":{"shasum":"3c4aba6c27699291f60329d4b04349e6dc49d421","integrity":"sha512-fLAP6ziophJqMDwRTMcK96ri0a/dSnWhxtnRWA7/GfR8UmJ9+dpCzXeNMM5T9Z0VKp+WyHWeKhCsrT3tl7ia2w==","tarball":"https://registry.npmjs.org/markdown-table-ts/-/markdown-table-ts-1.0.1.tgz","fileCount":8,"unpackedSize":15046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6+kQCRA9TVsSAnZWagAAQsYP/iJqWzEkEzmIXPgFyJ32\nzwXoqBFz8iEB4XWanCcSuyk8RvIbynGFzHuYBBI8jovTgzil96vXEapq4kHX\niIzwPW+Jq8uuvJcbHgwgUwOVoAjRo3RmpFpTFxSVDrucK3B4hv/4/c+xeCkI\nT8qOrLSf+2eJHgOjSKND3+hR2PXImd61oh8AUl5SpBvpG8rCnPkMCM24w5yM\nFF1SY1i5ELGYD5wtX5bNAKOlB9IEuH6CI7ep7A2XnS5DLGZ4l3CjoMoc6cvn\npPrBlASAxG0GzRLzdjfc6IDbA1cDNQHRN7W8DfhX44B4bGw9/lcQa39Dx9/c\nR2cCf2808x2JG88uvpkuMTTRAnhAj8MHZkhCZsTGL+MgoxWCYZMljnpgpo7w\naX1MiGUr1KkO4TwTWEMAHtmz+2ldmd5SYYLwi3j/I2+NfUzjMFLiZNqvkNle\nrWQq5x+d+qTFVe6eLLow17FXcv0sUWO6gzeK/8t5HR+rTTUX/XK7cgojBU1H\nefRoTErHm66i1lSRAuavbXBOCi8ljzHaENMFjbFp5+i5FGNoHeWzbpDNUPcN\nUf3DtTQLKH/UXYtkLWAiBjfDX8ddJCOzAURrWwGG9lRYU6gcriXNIPyQBu7f\naqtzSH2tqK8krtUuvbMKul8siQzKto0uHLqMCI3XbGf779TqHh1nHHZ0xQP+\nwBle\r\n=hFbE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC39jtoLLYseWDGECYI+sMJ48R6mGHikzAC6+N3y/EkRAIgX+PPI/Egq5x1y4N0fqSKPHEUJEErqrk66vJBL6HvxiQ="}]},"_npmUser":{"name":"jiri.hajek","email":"jiri.hajek18@gmail.com"},"directories":{},"maintainers":[{"name":"jiri.hajek","email":"jiri.hajek18@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-table-ts_1.0.1_1609296144270_0.12011339300185075"},"_hasShrinkwrap":false},"1.0.2":{"name":"markdown-table-ts","version":"1.0.2","keywords":["markdown","md","table","tables","ts"],"description":"A zero-dependency library for generating Markdown tables written in TypeScript.","main":"index.js","types":"index.d.ts","scripts":{"build":"tsc && cp lib/src/index.* .","lint":"eslint --ext '.ts' src test jest.config.ts","test":"jest","clean":"rm -rf index.js index.d.ts lib","pub":"yarn build && yarn lint && yarn test && yarn publish"},"homepage":"https://gitlab.com/jiri.hajek/markdown-table-ts","repository":{"type":"git","url":"https://gitlab.com/jiri.hajek/markdown-table-ts.git"},"bugs":{"url":"https://gitlab.com/jiri.hajek/markdown-table-ts/-/issues"},"author":{"name":"Jiri Hajek"},"license":"MIT","devDependencies":{"@types/jest":"^26.0.19","@typescript-eslint/eslint-plugin":"^4.11.0","@typescript-eslint/parser":"^4.11.0","eslint":"^7.16.0","eslint-config-airbnb-typescript":"^12.0.0","eslint-plugin-import":"^2.22.1","jest":"^26.6.3","ts-jest":"^26.4.4","ts-node":"^9.1.1","typescript":"^4.1.3"},"licenseText":"MIT License\n\nCopyright (c) 2020 Jiri Hajek\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"markdown-table-ts@1.0.2","dist":{"shasum":"44f0a3016496ef8763064a56a304862d718f817e","integrity":"sha512-1vpNFl0DBU8OboWDbE7RTkbpTSFUzrMqVz9paCcmvR0AzlPFsxzZK/7mRY1q/q3uJBOW8GZcFW9hd6tu+GR1hg==","tarball":"https://registry.npmjs.org/markdown-table-ts/-/markdown-table-ts-1.0.2.tgz","fileCount":6,"unpackedSize":15853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7LnkCRA9TVsSAnZWagAACcsP/Rn2iHCsq8398ZHix63z\nASQnJl27PcjVGjSjsLiYMfCX4mEoYgAWpFVUDF3KfO7HrptiBibprlQ3u/bc\nwshCekUkN5GK2WQoV32vXbK9gMeNvJ+a/oyS1htHYyRYnev2aknyt//1qxKT\ncaU3Mw60AuWFo4Uz+8GaSTSwQGAk7HuXAKW+5eQ+u24IOgqfL5JMOLu9VKMm\nSMsWEcduP+DX9W/hNkQrHXm48qK0qOgJd1Oab87/WNActSSctU3mHwtjWEVH\n5ZdukX8u1xolQoPf89hXGIcMc6cA2Log+mxk3YHMjyxDXX7unlkvlqFefaGn\n11UPoEyAMeJXd7heNvm1Lp9H/5VzPel4Bqu9frpXpu7S3h4bGCl+GGEj9nb6\n6usMKV6G42J6v/6Hb8W7c7nIsXu1uEBYc+TZ09HsXEBUIsz0mz8lnbxj3/QW\nqQ88bF9Jaz2/+c0O0FfZhrnoOMIxCOmujQis03GifzzWntI9LhRBJTSqHCua\nvp7foK+zdDISYRbuw5KmYxrERva5z8/Uspnz2MFsLyRWbRfeKhUR3HoQLdLQ\nVni43rJU1Y4sVj1mDidlD3Vi7nhy3k9yR3IW1DKR6z/AbRLt29ECqyvbxfOO\nFyVO5s+OH2YoqyUCuqYeh9427XsvlKxhr0Wcvo7EKq43kXBrZYvwZHAtAg3d\nN3u6\r\n=nMmw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqqeWhZ3OQ1HzRiJJqdZJepS6QDhigstvzfsiidRdiIQIhAOSIovLsR6tryoLJBnjrr804tKx6CrohvP+F3Ugbh4eL"}]},"_npmUser":{"name":"jiri.hajek","email":"jiri.hajek18@gmail.com"},"directories":{},"maintainers":[{"name":"jiri.hajek","email":"jiri.hajek18@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-table-ts_1.0.2_1609349604259_0.3378883620596662"},"_hasShrinkwrap":false},"1.0.3":{"name":"markdown-table-ts","version":"1.0.3","keywords":["markdown","md","table","tables","ts","typescript","types","typed","generate","generator","convert","converter"],"description":"A zero-dependency library for generating Markdown tables written in TypeScript.","main":"index.js","types":"index.d.ts","scripts":{"build":"tsc && cp lib/src/index.* .","lint":"eslint --ext '.ts' src test jest.config.ts","test":"jest","clean":"rm -rf index.js index.d.ts lib","pub":"yarn build && yarn lint && yarn test && yarn publish"},"homepage":"https://gitlab.com/jiri.hajek/markdown-table-ts","repository":{"type":"git","url":"https://gitlab.com/jiri.hajek/markdown-table-ts.git"},"bugs":{"url":"https://gitlab.com/jiri.hajek/markdown-table-ts/-/issues"},"author":{"name":"Jiri Hajek"},"license":"MIT","devDependencies":{"@types/jest":"^26.0.19","@typescript-eslint/eslint-plugin":"^4.11.0","@typescript-eslint/parser":"^4.11.0","eslint":"^7.16.0","eslint-config-airbnb-typescript":"^12.0.0","eslint-plugin-import":"^2.22.1","jest":"^26.6.3","ts-jest":"^26.4.4","ts-node":"^9.1.1","typescript":"^4.1.3"},"licenseText":"MIT License\n\nCopyright (c) 2020 Jiri Hajek\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"markdown-table-ts@1.0.3","dist":{"shasum":"46e4163805f1ca0b1076863b93996ba77436f990","integrity":"sha512-lYrp7FXmBqpmGmsEF92WnSukdgYvLm15FPIODZOx9+3nobkxJxjBYcszqZf5VqTjBtISPSNC7zjU9o3zwpL6AQ==","tarball":"https://registry.npmjs.org/markdown-table-ts/-/markdown-table-ts-1.0.3.tgz","fileCount":6,"unpackedSize":15527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7SHSCRA9TVsSAnZWagAAMlcP/3AkwTfv2BMb4XlprJnC\n77t9wWdJpOv4fhggKI76ymHD2ZVEMn47G7SSu6D9LvcOPtq88WgSm7POyI/m\nybStFIEZWlRpb4WFDaEz8tOuLo1U60p0A095DasYQOGBHdB4CJvQ+GUhTw+a\nT5Iosj85C5mPi20WdtRRugxXnEnAOfZzKievUP0aJ7/uoM6XIz0w90hRZCqE\npr4jVHbuYjeoTZ7kYJ8iPbJP6U2gCV2C6qGgtECEhXocIh5qm1crE04Ivape\ndGCqdn7sNJGxWFdjPiPIJ1iNMyYSCXlshW1T9qSZ7GsaLyF1009lnpenxO97\niFxFdlux30beeEv2HWKRijuIFeEaegJtbNMH1manMMbK4zAsx8ZtRh7SrQej\nM2rAY7dS02Im8FDlvRkAYEjRNASLAnST+lWvO38ivSiYCS7mu0+W5znxcGsd\nNxke1nC024dI3x2DzLENB8h72TAgeV7gsPEC+a4Mb//VeIH7aNVQFc2jpqMP\nEewoXrx0X1q4O7AYwNjiaiLM6qDgKVBToidP27Oy4zjZoUx0Vx3C/CNNBuQY\nowE11rDDz+1oDc/0nin7RBYl0yJHMGMfhnkCyOwyloGzuW8jAUcAqAct9Cme\nIcrhuRshikFe/u5CTB9tppcx2QXtchqXXOHfl05k1N1YXeBBVNV+HPMFx31v\nSu4f\r\n=WdI7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB79DwDpwO6EJEJmmg7Narw2M2FNYKWVdECsjmNRTjREAiAUXN0fKORn5+w9p+qVeVC4ONUlwbWgzaGlrlF8NUMWfQ=="}]},"_npmUser":{"name":"jiri.hajek","email":"jiri.hajek18@gmail.com"},"directories":{},"maintainers":[{"name":"jiri.hajek","email":"jiri.hajek18@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-table-ts_1.0.3_1609376209948_0.7891534107777449"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-29T19:21:01.857Z","1.0.0":"2020-12-29T19:21:02.021Z","modified":"2022-05-08T20:34:19.557Z","1.0.1":"2020-12-30T02:42:24.416Z","1.0.2":"2020-12-30T17:33:24.407Z","1.0.3":"2020-12-31T00:56:50.071Z"},"maintainers":[{"name":"jiri.hajek","email":"jiri.hajek18@gmail.com"}],"description":"A zero-dependency library for generating Markdown tables written in TypeScript.","homepage":"https://gitlab.com/jiri.hajek/markdown-table-ts","keywords":["markdown","md","table","tables","ts","typescript","types","typed","generate","generator","convert","converter"],"repository":{"type":"git","url":"https://gitlab.com/jiri.hajek/markdown-table-ts.git"},"author":{"name":"Jiri Hajek"},"bugs":{"url":"https://gitlab.com/jiri.hajek/markdown-table-ts/-/issues"},"license":"MIT","readme":"# markdown-table-ts\n[![pipeline](https://img.shields.io/gitlab/pipeline/jiri.hajek/markdown-table-ts/master)](https://gitlab.com/jiri.hajek/markdown-table-ts/-/pipelines?page=1&scope=all&ref=master)\n[![coverage](https://gitlab.com/jiri.hajek/markdown-table-ts/badges/master/coverage.svg)](https://gitlab.com/jiri.hajek/markdown-table-ts/-/commits/master)\n[![license](https://img.shields.io/npm/l/markdown-table-ts)](https://gitlab.com/jiri.hajek/markdown-table-ts/-/blob/master/LICENSE)\n[![version](https://img.shields.io/npm/v/markdown-table-ts)](https://www.npmjs.com/package/markdown-table-ts)\n[![downloads](https://img.shields.io/npm/dt/markdown-table-ts)](https://www.npmjs.com/package/markdown-table-ts)\n\n[markdown-table-ts](https://www.npmjs.com/package/markdown-table-ts) is a zero-dependency library for generating Markdown tables. Since it's written in TypeScript, it comes with type declarations out of the box.\n\n## Installation\nGrab [markdown-table-ts](https://www.npmjs.com/package/markdown-table-ts) from **npm** with your favorite package manager.\n\n```sh\n# npm\nnpm install markdown-table-ts\n\n# yarn\nyarn add markdown-table-ts\n```\n\n## Quick start\n```typescript\n// Node.js\n// const { Align, getMarkdownTable } = require('markdown-table-ts');\n\n// Node.js with TypeScript\nimport { Align, getMarkdownTable } from 'markdown-table-ts';\n\nconst table = getMarkdownTable({\n  table: {\n    head: ['ID', 'Name', 'Age'],\n    body: [\n      ['1', 'John',  '26'],\n      ['2', 'Bob',   '25'],\n      ['3', 'Alice', '23'],\n    ],\n  },\n  alignment: [Align.Left, Align.Center, Align.Right],\n});\n\nconsole.log(table);\n\n// Output:\n// | ID  | Name  | Age |\n// | :-- | :---: | --: |\n// | 1   | John  |  26 |\n// | 2   |  Bob  |  25 |\n// | 3   | Alice |  23 |\n```\n\n## API\n### `getMarkdownTable(params: GetTableInput): string`\n* generates the corresponding Markdown table based on `params`\n* does **not** append newline to the end of the resulting table\n* throws a `MarkdownTableError` when something goes wrong.\n\nThe underlying structure of `GetTableInput` looks like this.\n```typescript\nenum Align {\n  Left   = 'left',\n  Right  = 'right',\n  Center = 'center',\n  None   = 'none',\n}\n\ntype Column = string;\ntype Row    = Column[];\n\ninterface Table {\n  head: Row,\n  body: Row[],\n}\n\ninterface GetTableInput {\n  table:         Table,\n\n  alignColumns?: boolean,\n  alignment?:    Align[],\n}\n```\n\n#### `params.table.head`\n* table headers\n* must be an array of strings\n* **cannot** be empty\n\n##### Examples\n```typescript\n// OK\n['header1', 'header2', 'header3']\n\n// Error\nundefined\n[]\n```\n\n#### `params.table.body`\n* table body\n* must be an array whose elements are arrays of strings\n* **can** be empty\n\n##### Examples\n```typescript\n// OK\n['column1', 'column2', 'column3']\n[]\n\n// Error\nundefined\n```\n\n#### `params.alignColumns`\n* whether to vertically align columns (`|`)\n* must be boolean or undefined (in which case it will default to **true**)\n\n##### Examples\n```typescript\n// OK\ntrue\nfalse\nundefined\n\n// Error\n'yes'\n1\n\n```\n\n##### `alignColumns` on/off\n```typescript\nimport { Align, Table, getMarkdownTable } from 'markdown-table-ts';\n\nconst myTable: Table = {\n  head: ['first header', 'second header', 'very very very long header'],\n  body: [\n    ['1',                      'John',  '26'],\n    ['very very very long id', 'Bob',   '25'],\n    ['3',                      'Alice', '23'],\n  ],\n};\n\nconst myAlignment: Align[] = [Align.Center, Align.None, Align.Right];\n\nconsole.log(getMarkdownTable({\n  table: myTable,\n  alignment: myAlignment,\n\n  alignColumns: true,\n}));\n\nconsole.log(getMarkdownTable({\n  table: myTable,\n  alignment: myAlignment,\n\n  alignColumns: false,\n}));\n\n// alignColumns on\n// |      first header      | second header | very very very long header |\n// | :--------------------: | ------------- | -------------------------: |\n// |           1            | John          |                         26 |\n// | very very very long id | Bob           |                         25 |\n// |           3            | Alice         |                         23 |\n\n// alignColumns off\n// | first header | second header | very very very long header |\n// | :-: | --- | --: |\n// | 1 | John | 26 |\n// | very very very long id | Bob | 25 |\n// | 3 | Alice | 23 |\n```\n\n#### `params.alignment`\n* defines how to align each of the columns\n* must be an array of `Align` which is one of\n  * `Align.Left` (`:----`)\n  * `Align.Right` (`----:`)\n  * `Align.Center` (`:---:`)\n  * `Align.None` (`-----`)\n* defaults to `Align.None`\n\n##### Examples\n```typescript\n// OK\n[Align.Left, Align.Right, Align.Center, Align.None]\n\n// Not recommended but this will also pass if you turn off type checking\n['left', 'right', 'center', 'none']\n\n// Error\n[Align.left, 1, 'hello']\n```\n\n## Edge cases\n### Some rows have more columns than others\nWhen some of the rows (table head included) have more columns than others, the resulting table will have as many columns as the row with the most columns. Undefined columns will be empty.\n\n```typescript\nimport { getMarkdownTable } from 'markdown-table-ts';\n\nconst table = getMarkdownTable({\n  table: {\n    head: ['ID', 'Name', 'Age'],\n    body: [\n      ['1', 'John',  '26', 'more data', 'even more data'],\n      ['2', 'Bob',   '25'],\n      ['3', 'Alice', '23', 'extra column'],\n    ],\n  },\n});\n\nconsole.log(table);\n\n// Output:\n// | ID  | Name  | Age |              |                |\n// | --- | ----- | --- | ------------ | -------------- |\n// | 1   | John  | 26  | more data    | even more data |\n// | 2   | Bob   | 25  |              |                |\n// | 3   | Alice | 23  | extra column |                |\n```\n\n### Length of `alignment` array is less than amount of columns in the table\nWhen there are less elements in the `params.alignment` array than there are columns in the resulting table, `getMarkdownTable` will still succeed and columns with undefined alignment will default to `Align.None` (`-----`), e.g. when there are 4 columns in the table and the length of `params.alignment` is **2**, the first **2** columns will use alignment from `params.alignment` and the rest of the columns will default to `Align.None` (`-----`).\n\n```typescript\nimport { Align, getMarkdownTable } from 'markdown-table-ts';\n\nconst table = getMarkdownTable({\n  table: {\n    head: ['ID', 'Name', 'Age', 'Country'],\n    body: [\n      ['1', 'John',  '26', 'Czechia'],\n      ['2', 'Bob',   '25', 'United States'],\n      ['3', 'Alice', '23', 'Denmark'],\n    ],\n  },\n  alignment: [Align.Center, Align.Left],\n});\n\nconsole.log(table);\n\n// Output:\n// | ID  | Name  | Age | Country       |\n// | :-: | :---- | --- | ------------- |\n// |  1  | John  | 26  | Czechia       |\n// |  2  | Bob   | 25  | United States |\n// |  3  | Alice | 23  | Denmark       |\n```\n","readmeFilename":"README.md"}