Comparing version 0.0.19 to 0.0.20
12
index.js
@@ -10,3 +10,3 @@ var chalk = require("chalk"); | ||
// Johnny-Five library https://github.com/rwaldron/johnnny-five | ||
fmap = function(value, fromLow, fromHigh, toLow, toHigh) { | ||
var fmap = function(value, fromLow, fromHigh, toLow, toHigh) { | ||
return (value - fromLow) * (toHigh - toLow) / | ||
@@ -16,3 +16,3 @@ (fromHigh - fromLow) + toLow; | ||
constrain = function(value, lower, upper) { | ||
var constrain = function(value, lower, upper) { | ||
return Math.min(upper, Math.max(lower, value)); | ||
@@ -67,4 +67,8 @@ }; | ||
if (Array.isArray(data)) { | ||
data = data[0]; | ||
} | ||
var type = typeof data; | ||
if (String(data).length > maxValueLength) { | ||
@@ -155,2 +159,4 @@ maxValueLength = String(data).length; | ||
Barcli.prototype.set = Barcli.prototype.update; | ||
// Clear the console and hide the cursor | ||
@@ -157,0 +163,0 @@ process.stdout.write("\033[2J"); |
{ | ||
"name": "barcli", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"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
11298
141