A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sindresorhus/terminal-size below:

sindresorhus/terminal-size: Reliably get the terminal window size

terminal-size

Reliably get the terminal window size

Because process.stdout.columns doesn't exist when run non-interactively, for example, in a child process or when piped. This module even works when all the TTY file descriptors are redirected!

Confirmed working on macOS, Linux, and Windows.

Install
npm install terminal-size
Usage
import terminalSize from 'terminal-size';

terminalSize();
//=> {columns: 143, rows: 24}
API terminalSize()

Returns an object with columns and rows properties.

Related

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4