Skip to content

Commit

Permalink
added example with start/total value of 0/0
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiDittrich committed Sep 5, 2017
1 parent 4372639 commit d5336ba
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions example.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ var _progress = require('./main');
Example1(function(){
Example2(function(){
Example3(function(){
console.log('\nDemo finished!');
Example4(function(){
console.log('\nDemo finished!');
});
});
});
});
Expand Down Expand Up @@ -104,4 +106,19 @@ function Example3(onComplete){
onComplete.apply(this);
}
}, 20);
}
}

function Example4(onComplete){
// EXAMPLE 1 ---------------------------------------------
console.log('\nExample 4 - Start ZERO');
// create new progress bar using default values
var b1 = new _progress.Bar();
b1.start(0, 0);

setTimeout(function(){
b1.stop();

// run complete callback
onComplete.apply(this);
}, 1000);
}

0 comments on commit d5336ba

Please sign in to comment.