We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would love an option to separate the column headers from the body of the table with a line.
I love the truncation and autowrap features of your module. But, for some of my tables having a table separator looks a lot cleaner in my opinion.
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
+1. I added the following line to add '----' after header.
col = col.slice(0, col.indexOf('\n')) + '\n' +'-'.repeat(col.indexOf('\n')) + col.slice(col.indexOf('\n'));
I did it by doing a simple function that adds the dashes
const addDashes = (text: string) => { const repeat = () => `${'-'.repeat(30)}`; return `${repeat()}\n${text}\n${repeat()}` }
and then calling the function in my config.headingTransform. Like this:
config.headingTransform
columnify(data,{headingTransform: text => addDashes(text)})
Home someone can use this snippet
No branches or pull requests
Would love an option to separate the column headers from the body of the table with a line.
I love the truncation and autowrap features of your module. But, for some of my tables having a table separator looks a lot cleaner in my opinion.
Using tablify:
Using columnify
The text was updated successfully, but these errors were encountered: