cli-progress
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -0,1 +1,4 @@ | ||
### 1.6.1 ### | ||
* Bugfix: `roundTo` parameter was not set for `elapsedTime` calculation which caused raw float values within formatted time strings - thanks to [rekinyz on GitHub](https://github.com/AndiDittrich/Node.CLI-Progress/pull/16) #16 | ||
### 1.6.0 ### | ||
@@ -2,0 +5,0 @@ * Added: Additional payload data which can be used as **custom-tokens** within the bar - thanks to [tobiasps on GitHub](https://github.com/AndiDittrich/Node.CLI-Progress/pull/15) #15 |
@@ -99,3 +99,3 @@ var _readline = require('readline'); | ||
var elapsedTime = Math.round((Date.now() - this.startTime)/1000); | ||
var elapsedTimef = this.formatTime(elapsedTime); | ||
var elapsedTimef = this.formatTime(elapsedTime, 1); | ||
@@ -145,6 +145,6 @@ // calculate eta | ||
// format a number of seconds into hours and minutes as appropriate | ||
Bar.prototype.formatTime = function (t, roundTo) { | ||
Bar.prototype.formatTime = function (t, roundToMultipleOf) { | ||
var round = function (input) { | ||
if (roundTo) { | ||
return roundTo * Math.round(input / roundTo); | ||
if (roundToMultipleOf) { | ||
return roundToMultipleOf * Math.round(input / roundToMultipleOf); | ||
} else { | ||
@@ -151,0 +151,0 @@ return input |
{ | ||
"name": "cli-progress", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "Easy to use Progress-Bar for Command-Line/Terminal Applications", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
26198