Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

barcli

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

barcli - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

47

index.js

@@ -56,22 +56,6 @@ var chalk = require("chalk");

this.width = opts.width || 80;
barclis.push(this);
resize(opts.width || process.stdout.columns);
// Update our labels so the formatting is consistent
barclis.forEach(function(barcli, index) {
// Make sure the labels are laft padded with spaces
while (barcli.label.length < maxLabelLength) {
barcli.label = " " + barcli.label;
}
// Output the label
process.stdout.write("\033["+String(barcli.index+1)+";0H");
process.stdout.write(chalk[barcli.color](barcli.label + ": "));
process.stdout.write(chalk.white("|\n"));
});
}

@@ -82,2 +66,7 @@

if (String(data).length > maxValueLength) {
maxValueLength = String(data).length;
resize(process.stdout.columns);
}
var raw = data;

@@ -147,2 +136,26 @@

process.stdout.on('resize', function() {
resize(process.stdout.columns);
});
var resize = function(size) {
// Update our labels so the formatting is consistent
barclis.forEach(function(barcli, index) {
// Make sure the labels are laft padded with spaces
while (barcli.label.length < maxLabelLength) {
barcli.label = " " + barcli.label;
}
barcli.width = size - maxLabelLength - maxValueLength - 10;
// Output the label
process.stdout.write("\033["+String(barcli.index+1)+";0H");
process.stdout.write(chalk[barcli.color](barcli.label + ": "));
process.stdout.write(chalk.white("|\n"));
});
};
module.exports = Barcli;
{
"name": "barcli",
"version": "0.0.15",
"version": "0.0.16",
"description": "A simple tool for displaying real time bar graphs in the console",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc