How to use the progress.prototype function in progress

To help you get started, we’ve selected a few progress examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thumbsup / thumbsup / src / utils / progress.js View on Github external
BetterProgressBar.prototype.render = function (tokens) {
  const str = formatEta(this.eta())
  const actualFormat = this.fmt
  // improve display of ETA
  this.fmt = this.fmt.replace(':eta', str)
  ProgressBar.prototype.render.call(this, tokens)
  this.fmt = actualFormat
}
github karthikv / tradeship / patches / progress.js View on Github external
const ProgressBar = require("progress");

// Monkey patch terminate() so it doesn't throw an exception when the stream
// isn't a TTY. See: https://github.com/visionmedia/node-progress/pull/138
const terminate = ProgressBar.prototype.terminate;
ProgressBar.prototype.terminate = function() {
  if (!this.stream.isTTY) {
    return;
  }
  terminate.apply(this, arguments);
};

module.exports = ProgressBar;
github karthikv / tradeship / patches / progress.js View on Github external
const ProgressBar = require("progress");

// Monkey patch terminate() so it doesn't throw an exception when the stream
// isn't a TTY. See: https://github.com/visionmedia/node-progress/pull/138
const terminate = ProgressBar.prototype.terminate;
ProgressBar.prototype.terminate = function() {
  if (!this.stream.isTTY) {
    return;
  }
  terminate.apply(this, arguments);
};

module.exports = ProgressBar;