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.7 to 0.0.8

7

index.js

@@ -7,3 +7,3 @@ var chalk = require("chalk");

// fmap() and contrain() are lifted from Rick Waldron's awesome
// fmap() and constrain() are lifted from Rick Waldron's awesome
// Johnny-Five library https://github.com/rwaldron/johnnny-five

@@ -34,2 +34,3 @@ fmap = function(value, fromLow, fromHigh, toLow, toHigh) {

this.label = opts.label || "Input " + String(this.index + 1);
this.constrain = !!opts.constrain || false;

@@ -65,3 +66,7 @@ // So we can left align all the graphs

var raw = data;
// Map and constrain the input values
if (this.constrain) {
raw = constrain(raw, this.inputRange[0], this.inputRange[1]);
}
data = fmap(data, this.inputRange[0], this.inputRange[1], 0, this.width);

@@ -68,0 +73,0 @@ data = constrain(data, 0, this.width);

5

package.json
{
"name": "barcli",
"version": "0.0.7",
"version": "0.0.8",
"description": "A simple tool for displaying real time bar graphs in the console",

@@ -21,2 +21,5 @@ "main": "index.js",

"author": "Donovan Buck <donovan@donovan.bz>",
"contributors": [
{ "name": "David Resseguie", "email": "<david@resseguie.com>" }
],
"license": "MIT",

@@ -23,0 +26,0 @@ "bugs": {

@@ -49,2 +49,4 @@ # barcli [bahrk-lee]

**constrain** (Boolean) - Constrains displayed input value to given inputRange (Default: false)
**width** (Integer) - The length of the bar in terminal characters (Default: 80)

@@ -51,0 +53,0 @@

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