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

do not draw new line on the top (borderless) #102

Merged
merged 3 commits into from
Aug 15, 2019

Conversation

raffis
Copy link
Contributor

@raffis raffis commented Aug 15, 2019

Current situation

If data gets streamed to stdout and no border is configured (void), a leading new line
gets written to stdout at the beginning.

Should

With no borders there shouldn't be a new line on the top.

Reproduce

const createStream = require('table').createStream;
const getBorderCharacters = require('table').getBorderCharacters;

let config,
  stream;

config = {
  border: getBorderCharacters('void'), //no problem using ramac for example.
  columnDefault: {
    width: 50
  },
  columnCount: 1
};

stream = createStream(config);

setInterval(() => {
  stream.write([new Date()]);
}, 500);

@coveralls
Copy link

coveralls commented Aug 15, 2019

Pull Request Test Coverage Report for Build 185

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 74.074%

Totals Coverage Status
Change from base Build 179: 0.4%
Covered Lines: 172
Relevant Lines: 233

💛 - Coveralls

@gajus gajus merged commit 117f902 into gajus:master Aug 15, 2019
@gajus
Copy link
Owner

gajus commented Aug 15, 2019

🎉 This PR is included in version 5.4.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants