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

Break line present at the end #22

Closed
Kikobeats opened this issue Apr 22, 2017 · 4 comments
Closed

Break line present at the end #22

Kikobeats opened this issue Apr 22, 2017 · 4 comments

Comments

@Kikobeats
Copy link

I'm using get-sdtdin at regexgen-cli and I noticed that an \n is always present at the final of the input:

getStdin().then(stdin => {
  console.log(stdin)
  console.log([].concat(stdin))
})
echo hola | regexgen
hola

[ 'hola\n' ]
@sindresorhus
Copy link
Owner

And what is the problem exactly? This module just consumes the whole stdin, the last \n produced by echo included.

@Kikobeats
Copy link
Author

If this behavior is the expected then is ok and is my reponsability clean or not the break line 😄

@sindresorhus
Copy link
Owner

Yes, it's expected. In execa, I use strip-eof to remove it. Might be helpful for you too.

@Kikobeats
Copy link
Author

Thanks!

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

2 participants