MCPcopy Create free account
hub / github.com/NathanPB/progress.js / checkCompleteEvent

Method checkCompleteEvent

src/ProgressBar.ts:68–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66 }
67
68 private checkCompleteEvent() {
69 if (this.completeEventEmitted && !this.isComplete()) {
70 this.completeEventEmitted = false
71 }
72
73 if (this.isComplete() && this.current > 0 && !this.completeEventEmitted) {
74 this.completeEventEmitted = true
75 this.emit(Events.COMPLETED)
76 }
77 }
78
79 public tick(value: number) {
80 const incValue = (this.current + value) > this.total

Callers 3

currentMethod · 0.95
totalMethod · 0.95
constructorMethod · 0.95

Calls 1

isCompleteMethod · 0.95

Tested by

no test coverage detected