Skip to content
New issue

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

paddingChr per column? #56

Open
dland512 opened this issue Mar 22, 2019 · 0 comments
Open

paddingChr per column? #56

dland512 opened this issue Mar 22, 2019 · 0 comments

Comments

@dland512
Copy link

Is is possible to use different padding characters for difference columns or use a padding character for one column and not another? I have this code:

const qa = [
    {
        question: 'How are you?',
        answer: 'I am fine'
    },
    {
        question: 'Are you sure?',
        answer: 'Yes'
    },
    {
        question: 'Are you sure you\'re sure?',
        answer: ''
    }
];
    
console.log(columnify(qa, { showHeaders: false, paddingChr: '.' }));

What I'm getting is this:

How are you?............. I am fine
Are you sure?............ Yes......
Are you sure you're sure? .........

I only want dots leading from the questions to the answers, not after the answers, like this:

How are you?............. I am fine
Are you sure?............ Yes
Are you sure you're sure? 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant