MCPcopy Create free account
hub / github.com/npkgz/cli-progress / update

Method update

lib/single-bar.js:45–59  ·  view source on GitHub ↗
(current, payload)

Source from the content-addressed store, hash-verified

43 }
44
45 update(current, payload){
46 // timer inactive ?
47 if (!this.timer) {
48 return;
49 }
50
51 super.update(current, payload);
52
53 // trigger synchronous update ?
54 // check for throttle time
55 if (this.options.synchronousUpdate && (this.lastRedraw + this.options.throttleTime*2) < Date.now()){
56 // force update
57 this.render();
58 }
59 }
60
61 // start the progress bar
62 start(total, startValue, payload){

Callers

nothing calls this directly

Calls 1

renderMethod · 0.95

Tested by

no test coverage detected