node/deps/npm/node_modules/term-size
Rod Vagg 78a2dc7de2
deps: update term-size with signed version
PR-URL: https://github.com/nodejs/node/pull/31459
Refs: https://github.com/nodejs/node/issues/29216
Refs: https://github.com/sindresorhus/macos-term-size/pull/3
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ash Cripps <ashley.cripps@ibm.com>
Signed-off-by: Rod Vagg <rod@vagg.org>
2020-03-21 19:30:47 +11:00
..
vendor deps: update term-size with signed version 2020-03-21 19:30:47 +11:00
index.js
license
package.json
readme.md

readme.md

term-size Build Status: Linux & macOS Build Status: Windows

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 --save term-size

Usage

const termSize = require('term-size');

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

API

termSize()

Returns an Object with columns and rows properties.

License

MIT © Sindre Sorhus