Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/are-we-there-yet/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: 'use strict'
const TrackerBase = require('./tracker-base.js')
class Tracker extends TrackerBase {
constructor (name, todo) {
super(name)
this.workDone = 0
this.workTodo = todo || 0
}
completed () {
return this.workTodo === 0 ? 0 : this.workDone / this.workTodo
}
addWork (work) {
this.workTodo += work
this.emit('change', this.name, this.completed(), this)
}
completeWork (work) {
this.workDone += work
if (this.workDone > this.workTodo) {
this.workDone = this.workTodo
}
this.emit('change', this.name, this.completed(), this)
}
finish () {
this.workTodo = this.workDone = 1
this.emit('change', this.name, 1, this)
}
}
module.exports = Tracker
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0036 ]-- |