Skip to content

terriann/CsvToPlainTextTable

 
 

Repository files navigation

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

About

A Simple JavaScript/Node.js CSV to Markdown Table Converter with Confluence Markup Support

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 54.0%
  • HTML 26.8%
  • TypeScript 19.2%