/markdown-table-gen

A script that generates a Markdown table from an array of strings for a given number of columns

Primary LanguageSwiftMIT LicenseMIT

Markdown Table Generator

Travis build status Codecov
Swift Platform: iOS macOS tvOS watchOS
Twitter Donate via PayPal

This is a little script written in Swift that generates a Markdown table from an array of strings for a given number of columns.

Example

let data = ["Here's", "To", "The", "Crazy", "Ones"]

print(markdownTable(for: data, numberOfColumns: 4))
|        |        |        |        |
| ------ | ------ | ------ | ------ |
| Here's | To     | The    | Crazy  |
| Ones   |        |        |        |
Here's To The Crazy
Ones

License

This project is available under the MIT license. See the LICENSE file for more info.