Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.88 KB

README.md

File metadata and controls

58 lines (36 loc) · 1.88 KB

CSV To Plain Text Table

Build Status Coverage Status GitHub license

A simple JavaScript CSV to Markdown Table converter with Confluence Markup support

View the live demo to convert your CSV to a table on-the-fly.

Requires no external libraries. Works in Node.js as well as in browser.

For Markdown (Github/BitBucket)

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

For Confluence Markup (JIRA/Confluence)

Example Use:

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

Outputs:

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

Which displays in JIRA/Confluence as:

header1 header2 header3
Value1 Value2 Value3

Contributing

Are you interested in contributing to this project? Please read CONTRIBUTING.md for information on how to contribute, developer installation, required testing steps and other information about best practices for this project.

Credits