term-size

WebJar for term-size

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

term-size
Last Version

Last Version

2.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

term-size
WebJar for term-size
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/term-size

Download term-size

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/term-size/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>term-size</artifactId>
    <version>2.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/term-size/
implementation 'org.webjars.npm:term-size:2.2.1'
// https://jarcasting.com/artifacts/org.webjars.npm/term-size/
implementation ("org.webjars.npm:term-size:2.2.1")
'org.webjars.npm:term-size:jar:2.2.1'
<dependency org="org.webjars.npm" name="term-size" rev="2.2.1">
  <artifact name="term-size" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='term-size', version='2.2.1')
)
libraryDependencies += "org.webjars.npm" % "term-size" % "2.2.1"
[org.webjars.npm/term-size "2.2.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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

Usage

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

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

API

termSize()

Returns an object with columns and rows properties.

Info

The bundled macOS binary is signed and hardened.

Related


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Versions

Version
2.2.1
2.2.0
1.2.0
0.1.1