Socket
Socket
Sign inDemoInstall

cli-width

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

.travis.yml

4

index.js

@@ -8,3 +8,3 @@ 'use strict';

if (process.stdout.getWindowSize) {
return process.stdout.getWindowSize()[0];
return process.stdout.getWindowSize()[0] || exports.defaultWidth;
}

@@ -15,3 +15,3 @@ else {

if (tty.getWindowSize) {
return tty.getWindowSize()[1];
return tty.getWindowSize()[1] || exports.defaultWidth;
}

@@ -18,0 +18,0 @@ else {

{
"name": "cli-width",
"version": "1.1.0",
"version": "1.1.1",
"description": "Get stdout window width, with two fallbacks, tty and then a default.",
"main": "index.js",
"scripts": {
"test": "node test | tap-spec"
"test": "node test | tspec",
"coverage": "isparta cover test/*.js | tspec",
"coveralls": "npm run coverage -s && coveralls < coverage/lcov.info",
"postcoveralls": "rimraf ./coverage"
},

@@ -20,5 +23,8 @@ "repository": {

"devDependencies": {
"tap-spec": "^2.2.0",
"tape": "^3.4.0"
"tap-spec": "^4.1.0",
"tape": "^3.4.0",
"coveralls": "^2.11.4",
"isparta": "^3.0.4",
"rimraf": "^2.4.3"
}
}

@@ -6,2 +6,6 @@ cli-width

[![npm version](https://badge.fury.io/js/cli-width.svg)](http://badge.fury.io/js/cli-width)
[![Build Status](https://travis-ci.org/knownasilya/cli-width.svg)](https://travis-ci.org/knownasilya/cli-width)
[![Coverage Status](https://coveralls.io/repos/knownasilya/cli-width/badge.svg?branch=master&service=github)](https://coveralls.io/github/knownasilya/cli-width?branch=master)
## Usage

@@ -23,4 +27,4 @@

If none of the methods are supported, the default is `0` and
can be changed via `cliWidth.defaultWidth = 200;`.
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;`.

@@ -33,1 +37,3 @@ ## Tests

```
Coverage can be generated with `npm run coverage`.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc