@adam-rocska/markdown-table
v1.0.2
Published
A library with a simple API for generating Markdown tables.
Downloads
46
Maintainers
Readme
Markdown Table for TypeScript
A library with a simple API for generating Markdown tables.
Installation
pnpm add @adam-rocska/markdown-table
npm install @adam-rocska/markdown-table
yarn add @adam-rocska/markdown-table
Usage
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 |