|
|
8 gadi atpakaļ | |
|---|---|---|
| .. | ||
| coverage | 8 gadi atpakaļ | |
| .npmignore | 8 gadi atpakaļ | |
| .travis.yml | 8 gadi atpakaļ | |
| LICENSE | 8 gadi atpakaļ | |
| README.md | 8 gadi atpakaļ | |
| index.js | 8 gadi atpakaļ | |
| package.json | 8 gadi atpakaļ | |
Get stdout window width, with three fallbacks, tty, a custom environment variable and then a default.
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;.
npm install
npm test
Coverage can be generated with npm run coverage.