Socket
Socket
Sign inDemoInstall

status-bar

Package Overview
Dependencies
1
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

17

lib/index.js

@@ -45,7 +45,9 @@ "use strict";

Formatter.prototype.storage = function (b, decimals){
return unit (~~b, storage, 1024, decimals === undefined ? 1 : decimals);
return unit (Math.floor (b), storage, 1024,
decimals === undefined ? 1 : decimals);
};
Formatter.prototype.speed = function (bps, decimals){
return unit (~~bps, speeds, 1000, decimals === undefined ? 1 : decimals);
return unit (Math.floor (bps), speeds, 1000,
decimals === undefined ? 1 : decimals);
};

@@ -58,4 +60,4 @@

var str;
var min = ~~(s/60);
var sec = ~~(s%60);
var min = Math.floor (s/60);
var sec = Math.floor (s%60);
return zero (min) + ":" + zero (sec);

@@ -225,3 +227,3 @@ };

//SMooth the speed
//Smooth the speed
speed = (1 - this._speedSmooth)*speed + this._speedSmooth*lastSpeed;

@@ -235,6 +237,7 @@

this._stats.speed =
~~((1 - this._avgSmooth)*speed + this._avgSmooth*avgSpeed);
Math.floor ((1 - this._avgSmooth)*speed + this._avgSmooth*avgSpeed);
//Remaining time
this._stats.remainingTime = ~~(this._stats.remainingSize/avgSpeed) + 1
this._stats.remainingTime =
Math.floor (this._stats.remainingSize/avgSpeed) + 1
}

@@ -241,0 +244,0 @@ }

{
"name": "status-bar",
"version": "2.0.0",
"version": "2.0.1",
"description": "A status bar for file transfers",

@@ -5,0 +5,0 @@ "keywords": ["status", "bar", "file", "transfer", "speed", "progress",

@@ -162,3 +162,2 @@ status-bar

- [StatusBar#cancel() : undefined](#statusbar_cancel)
- [StatusBar#update(chunk) : undefined](#statusbar_update)

@@ -165,0 +164,0 @@ __Properties__

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