Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

azuki-trusty / azk   deb

Repository URL to install this package:

Version: 0.5.1 

/ usr / lib / azk / node_modules / progress / examples / exact.js


/**
 * Module dependencies.
 *
 * Example to show off the `update` method, which allows the
 * user to specify an exact progress.
 */

var ProgressBar = require('../');

var bar = new ProgressBar('  progress [:bar] :percent :etas', {
    complete: '='
  , incomplete: ' '
  , width: 40
  , total: 100
});

var i = 0, steps = [0.1, 0.25, 0.6, 0.8, 0.4, 0.5, 0.6, 0.2, 0.8, 1.0];

(function next() {
  if (i >= steps.length) {
  } else {
    bar.update(steps[i++]);
    setTimeout(next, 500);
  }
})();