Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 597 Bytes

README.md

File metadata and controls

30 lines (19 loc) · 597 Bytes

CSV To Markdown Table

Simple JavaScript CSV to Markdown Table Converter

Requires no external libraries.

Works in Node as well as in the browser.

There is a live web interface for it here.

Example Use:

csvToMarkdown( "header1,header2,header3\nValue1,Value2,Value3", ",", true);

Outputs:

| header1 | header2 | header3 | 
|---------|---------|---------| 
| Value1  | Value2  | Value3  | 

Which displays in markdown as:

header1 header2 header3
Value1 Value2 Value3