AhMyth 9000392778 beta version %!s(int64=8) %!d(string=hai) anos
..
coverage 9000392778 beta version %!s(int64=8) %!d(string=hai) anos
.npmignore 9000392778 beta version %!s(int64=8) %!d(string=hai) anos
.travis.yml 9000392778 beta version %!s(int64=8) %!d(string=hai) anos
LICENSE 9000392778 beta version %!s(int64=8) %!d(string=hai) anos
README.md 9000392778 beta version %!s(int64=8) %!d(string=hai) anos
index.js 9000392778 beta version %!s(int64=8) %!d(string=hai) anos
package.json 9000392778 beta version %!s(int64=8) %!d(string=hai) anos

README.md

cli-width

Get stdout window width, with three fallbacks, tty, a custom environment variable and then a default.

npm version Build Status Coverage Status

Usage

npm install --save cli-width
'use stict';

var cliWidth = require('cli-width');

cliWidth(); // maybe 204 :)

You can also set the CLI_WIDTH environment variable.

If none of the methods are supported, and the environment variable isn't set, the default is 0 and can be changed via cliWidth.defaultWidth = 200;.

Tests

npm install
npm test

Coverage can be generated with npm run coverage.