Socket
Socket
Sign inDemoInstall

cli-width

Package Overview
Dependencies
0
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.2.1

.nyc_output/00ef1b3d-3687-482b-8d03-de2f76b58f54.json

11

CHANGELOG.md

@@ -1,5 +0,14 @@

# Change Log
# Changelog
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.1](https://github.com/knownasilya/cli-width/compare/v2.2.0...v2.2.1) (2020-04-14)
### Bug Fixes
* add more node versions to travis ([f7bc148](https://github.com/knownasilya/cli-width/commit/f7bc14846c2547769681bfc56afed3d0b04aa11e))
* Reduce nesting in index.js and add package-lock.json ([#14](https://github.com/knownasilya/cli-width/issues/14)) ([92d8d6b](https://github.com/knownasilya/cli-width/commit/92d8d6b8e4ce3702b12356c5427723005fccf9b8))
* update deprecated deps and change coverage script ([db06065](https://github.com/knownasilya/cli-width/commit/db0606592f8347eb9f35abdf87c570e1d731463c))
<a name="2.2.0"></a>

@@ -6,0 +15,0 @@ # [2.2.0](https://github.com/knownasilya/cli-width/compare/v2.1.1...v2.2.0) (2017-08-22)

46

index.js

@@ -14,11 +14,11 @@ 'use strict';

return defaultOpts;
} else {
Object.keys(defaultOpts).forEach(function (key) {
if (!options[key]) {
options[key] = defaultOpts[key];
}
});
}
return options;
}
Object.keys(defaultOpts).forEach(function (key) {
if (!options[key]) {
options[key] = defaultOpts[key];
}
});
return options;
}

@@ -31,21 +31,21 @@

return opts.output.getWindowSize()[0] || opts.defaultWidth;
} else {
if (opts.tty.getWindowSize) {
return opts.tty.getWindowSize()[1] || opts.defaultWidth;
} else {
if (opts.output.columns) {
return opts.output.columns;
} else {
if (process.env.CLI_WIDTH) {
var width = parseInt(process.env.CLI_WIDTH, 10);
}
if (!isNaN(width) && width !== 0) {
return width;
}
}
}
if (opts.tty.getWindowSize) {
return opts.tty.getWindowSize()[1] || opts.defaultWidth;
}
return opts.defaultWidth;
if (opts.output.columns) {
return opts.output.columns;
}
if (process.env.CLI_WIDTH) {
var width = parseInt(process.env.CLI_WIDTH, 10);
if (!isNaN(width) && width !== 0) {
return width;
}
}
return opts.defaultWidth;
};
{
"name": "cli-width",
"version": "2.2.0",
"version": "2.2.1",
"description": "Get stdout window width, with two fallbacks, tty and then a default.",

@@ -8,5 +8,4 @@ "main": "index.js",

"test": "node test | tspec",
"coverage": "isparta cover test/*.js | tspec",
"coverage": "nyc node test | tspec",
"coveralls": "npm run coverage -s && coveralls < coverage/lcov.info",
"postcoveralls": "rimraf ./coverage",
"release": "standard-version"

@@ -18,3 +17,3 @@ },

},
"author": "Ilya Radchenko <ilya@burstcreations.com>",
"author": "Ilya Radchenko <knownasilya@gmail.com>",
"license": "ISC",

@@ -26,9 +25,8 @@ "bugs": {

"devDependencies": {
"coveralls": "^2.11.4",
"isparta": "^3.0.4",
"rimraf": "^2.4.3",
"standard-version": "^4.2.0",
"tap-spec": "^4.1.0",
"tape": "^3.4.0"
"coveralls": "^3.0.11",
"nyc": "^15.0.1",
"standard-version": "^7.1.0",
"tap-spec": "^5.0.0",
"tape": "^4.13.2"
}
}

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