progress
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -0,1 +1,6 @@ | ||
### 1.1.7 / 2014-06-30 | ||
* fixed a bug that occurs when a progress bar attempts to draw itself | ||
on a console with very few columns | ||
### 1.1.6 / 2014-06-16 | ||
@@ -2,0 +7,0 @@ |
@@ -112,3 +112,3 @@ /*! | ||
var percent = ratio * 100; | ||
var incomplete; | ||
var incomplete, complete, completeLength; | ||
var elapsed = new Date - this.start; | ||
@@ -131,4 +131,5 @@ var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); | ||
/* TODO: the following assumes the user has one ':bar' token */ | ||
complete = Array(Math.round(width * ratio)).join(this.chars.complete); | ||
incomplete = Array(width - complete.length).join(this.chars.incomplete); | ||
completeLength = Math.round(width * ratio); | ||
complete = Array(completeLength + 1).join(this.chars.complete); | ||
incomplete = Array(width - completeLength + 1).join(this.chars.incomplete); | ||
@@ -135,0 +136,0 @@ /* fill in the actual progress bar */ |
{ | ||
"name": "progress" | ||
, "version": "1.1.7" | ||
, "version": "1.1.8" | ||
, "description": "Flexible ascii progress bar" | ||
, "keywords": ["cli", "progress"] | ||
, "author": "TJ Holowaychuk <tj@vision-media.ca>" | ||
, "contributors": [ | ||
{ | ||
"name": "Christoffer Hallas" | ||
, "email": "christoffer.hallas@gmail.com" | ||
} | ||
, { | ||
"name": "Jordan Scales" | ||
, "email": "scalesjordan@gmail.com" | ||
} | ||
] | ||
, "dependencies": {} | ||
@@ -8,0 +18,0 @@ , "main": "index" |
11195
154