Skip to content
💥 A node package to find the terminal size with `process.stdout` fallback
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
.editorconfig
.gitignore
.npmignore
CHANGELOG.md
README.md
index.js
package.json

README.md

CLI SIZES

A node package to find the terminal size with a simple fallback option. Find the size of your terminal quickly

Installation

npm install --save cli-sizes

Usage

There is an options paramater that can be configured where possible - only one option for the time being can be passed

Examples

const size = require('cli-sizes')

console.log(size.cliSizes())
const size = require('cli-sizes')

// options
console.log(size.cliSizes({
getWindowSize: true
}))
// resize event
const size = require('cli-sizes')

console.log(size.resize())

API

  • cliSizes < function > Returns cols and rows with terminal size values
  • getWindowSize < object > Option used as a fallback: process.stdout
  • resize < function > Resize the terminal but retain dynamic values of size
You can’t perform that action at this time.