adam-rocska / markdown-table-typescript

A small TypeScript library with a convenient API to produce tables in MarkDown.
MIT License
0 stars 0 forks source link

Read From MarkDown Table #2

Open adam-rocska opened 2 months ago

adam-rocska commented 2 months ago

Yea, it would be dope to have something like:

MyType.fromMarkdown(markDownString); // resolve an array of MyType
MyType.fromMarkdown`
| Example | Column | Whatever |
| ------- | ------ | -------- |
| Hello   | World  |          |
`
tuplesFromMarkdown(markDownString); // Basically resolves the input parameters of the markdown table function
tuplesFromMarkdown`
| Example | Column | Whatever |
| ------- | ------ | -------- |
| Hello   | World  |          |
`
objectsFromMarkdown(markDownString); // Constructs an array of POJSO (hah, made that one up; #suchCreative)
objectsFromMarkdown`
| Example | Column | Whatever |
| ------- | ------ | -------- |
| Hello   | World  |          |
`
adam-rocska commented 2 months ago

FML, I need this ASAP! :D

adam-rocska commented 2 months ago

It could rely on this one too: https://github.com/adam-rocska/invertible-typescript