Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/nodejs/are-we-there-yet/lib/ drwxr-xr-x |
Viewing file: Select action/file-type: 'use strict' var util = require('util') var TrackerBase = require('./tracker-base.js') var Tracker = module.exports = function (name, todo) { TrackerBase.call(this, name) this.workDone = 0 this.workTodo = todo || 0 } util.inherits(Tracker, TrackerBase) Tracker.prototype.completed = function () { return this.workTodo === 0 ? 0 : this.workDone / this.workTodo } Tracker.prototype.addWork = function (work) { this.workTodo += work this.emit('change', this.name, this.completed(), this) } Tracker.prototype.completeWork = function (work) { this.workDone += work if (this.workDone > this.workTodo) { this.workDone = this.workTodo } this.emit('change', this.name, this.completed(), this) } Tracker.prototype.finish = function () { this.workTodo = this.workDone = 1 this.emit('change', this.name, 1, this) } |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0039 ]-- |