A library with a simple API for generating Markdown tables.
pnpm add @adam-rocska/markdown-table
npm install @adam-rocska/markdown-table
yarn add @adam-rocska/markdown-table
import {markdownTable} from '@adam-rocska/markdown-table';
markdownTable(
['First Name', 'Last Name', 'Most Loved Technology'],
['Adam', 'Rocska', 'Swift'],
['John', 'Doe', 'TypeScript'],
['Jane', 'Doe', 'Python'],
['Elon', 'Musk', 'JavaScript']
);
The code above yields the following output:
| First Name | Last Name | Most Loved Technology |
| ---------- | --------- | --------------------- |
| Adam | Rocska | Swift |
| John | Doe | TypeScript |
| Jane | Doe | Python |
| Elon | Musk | JavaScript |