pax_global_header 0000666 0000000 0000000 00000000064 13147032622 0014512 g ustar 00root root 0000000 0000000 52 comment=176376e902a7d9fde3d82c885978e6d13d6496fc
cli-width-2.2.0/ 0000775 0000000 0000000 00000000000 13147032622 0013377 5 ustar 00root root 0000000 0000000 cli-width-2.2.0/.gitignore 0000664 0000000 0000000 00000000054 13147032622 0015366 0 ustar 00root root 0000000 0000000 node_modules
coverage
*.log
*.swp
.DS_Store
cli-width-2.2.0/.npmignore 0000664 0000000 0000000 00000000033 13147032622 0015372 0 ustar 00root root 0000000 0000000 test
coverage
CHANGELOG.md
cli-width-2.2.0/.travis.yml 0000664 0000000 0000000 00000000221 13147032622 0015503 0 ustar 00root root 0000000 0000000 language: node_js
node_js:
- '0.10'
- '0.11'
- '0.12'
- 'iojs-1'
- 'iojs-2'
- 'iojs-3'
- '4.0'
after_script:
- npm run coveralls
cli-width-2.2.0/CHANGELOG.md 0000664 0000000 0000000 00000001120 13147032622 0015202 0 ustar 00root root 0000000 0000000 # Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
# [2.2.0](https://github.com/knownasilya/cli-width/compare/v2.1.1...v2.2.0) (2017-08-22)
### Features
* return default if env is 0 ([1833baf](https://github.com/knownasilya/cli-width/commit/1833baf)), closes [#9](https://github.com/knownasilya/cli-width/issues/9)
## [2.1.1](https://github.com/knownasilya/cli-width/compare/v2.1.0...v2.1.1) (2017-08-22)
cli-width-2.2.0/LICENSE 0000664 0000000 0000000 00000001367 13147032622 0014413 0 ustar 00root root 0000000 0000000 Copyright (c) 2015, Ilya Radchenko
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
cli-width-2.2.0/README.md 0000664 0000000 0000000 00000003427 13147032622 0014664 0 ustar 00root root 0000000 0000000 cli-width
=========
Get stdout window width, with four fallbacks, `tty`, `output.columns`, a custom environment variable and then a default.
[](http://badge.fury.io/js/cli-width)
[](https://travis-ci.org/knownasilya/cli-width)
[](https://coveralls.io/github/knownasilya/cli-width?branch=master)
## Usage
```
npm install --save cli-width
```
```js
'use strict';
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 width value is going to be `0`, that can be changed using the configurable `options`.
## API
### cliWidth([options])
`cliWidth` can be configured using an `options` parameter, the possible properties are:
- **defaultWidth**\ Defines a default value to be used if none of the methods are available, defaults to `0`
- **output**\