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

Let define the default columns. #49

Open
orassayag opened this issue Nov 3, 2020 · 4 comments
Open

Let define the default columns. #49

orassayag opened this issue Nov 3, 2020 · 4 comments

Comments

@orassayag
Copy link

orassayag commented Nov 3, 2020

    const getWidth = stream => {
	const {columns} = stream;

	if (!columns) {
		return 80;
	}

	return columns;
};

I want to define it to another number, is it possible?

@sindresorhus
Copy link
Owner

What's the use-case?

@orassayag
Copy link
Author

What's the use-case?

Well, I built node application for myself, that display data that change all the time in the console, using your package.

Everything worked fine, but i needed to add monitor using forever-monitor npm package.

It creates new instance of process when the application exit, keep the server running. But it creates 'process.stdout' without the columns property, and there is no way for me to change it dynamically, and with your default value is 80, when my console width is 220, the result is not good.

In 220 width (expected):
Untitled
In 80 width (not good):
Untitled2

@sindresorhus
Copy link
Owner

I guess we could add an option for it to .create().

@orassayag
Copy link
Author

I guess we could add an option for it to .create().

It would be greatly appreciated! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants