Comparing version 0.0.22 to 0.0.23
21
index.js
@@ -25,2 +25,6 @@ var chalk = require("chalk"); | ||
if (barclis.length === 0){ | ||
clearScreen(); | ||
} | ||
if (typeof opts === "undefined") { | ||
@@ -71,3 +75,3 @@ opts = {}; | ||
var type = typeof data; | ||
if (String(data).length > maxValueLength) { | ||
@@ -160,9 +164,14 @@ maxValueLength = String(data).length; | ||
// Clear the console and hide the cursor | ||
process.stdout.write("\033[2J"); | ||
var clearScreen = function() { | ||
process.stdout.on('resize', function() { | ||
resize(process.stdout.columns); | ||
}); | ||
// Clear the console and hide the cursor | ||
process.stdout.write("\033[2J"); | ||
// Redraw on resize event | ||
process.stdout.on('resize', function() { | ||
resize(process.stdout.columns); | ||
}); | ||
} | ||
var resize = function(size) { | ||
@@ -169,0 +178,0 @@ |
{ | ||
"name": "barcli", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"description": "A simple tool for displaying real time bar graphs in the console", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11572
147