REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.93 KB
Close
/proc/thread-self/root/opt/alt/alt-nodejs16/root/lib/node_modules/npm/node_modules/gauge/lib/template-item.js
Text
Base64
'use strict' var stringWidth = require('string-width') module.exports = TemplateItem function isPercent (num) { if (typeof num !== 'string') { return false } return num.slice(-1) === '%' } function percent (num) { return Number(num.slice(0, -1)) / 100 } function TemplateItem (values, outputLength) { this.overallOutputLength = outputLength this.finished = false this.type = null this.value = null this.length = null this.maxLength = null this.minLength = null this.kerning = null this.align = 'left' this.padLeft = 0 this.padRight = 0 this.index = null this.first = null this.last = null if (typeof values === 'string') { this.value = values } else { for (var prop in values) { this[prop] = values[prop] } } // Realize percents if (isPercent(this.length)) { this.length = Math.round(this.overallOutputLength * percent(this.length)) } if (isPercent(this.minLength)) { this.minLength = Math.round(this.overallOutputLength * percent(this.minLength)) } if (isPercent(this.maxLength)) { this.maxLength = Math.round(this.overallOutputLength * percent(this.maxLength)) } return this } TemplateItem.prototype = {} TemplateItem.prototype.getBaseLength = function () { var length = this.length if ( length == null && typeof this.value === 'string' && this.maxLength == null && this.minLength == null ) { length = stringWidth(this.value) } return length } TemplateItem.prototype.getLength = function () { var length = this.getBaseLength() if (length == null) { return null } return length + this.padLeft + this.padRight } TemplateItem.prototype.getMaxLength = function () { if (this.maxLength == null) { return null } return this.maxLength + this.padLeft + this.padRight } TemplateItem.prototype.getMinLength = function () { if (this.minLength == null) { return null } return this.minLength + this.padLeft + this.padRight }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 15
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
base-theme.js
424 B
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error.js
616 B
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
has-color.js
99 B
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
7.12 KB
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plumbing.js
1.25 KB
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
process.js
89 B
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
progress-bar.js
1.01 KB
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
render-template.js
5.81 KB
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
set-immediate.js
139 B
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
set-interval.js
93 B
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
spin.js
105 B
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
template-item.js
1.93 KB
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
theme-set.js
3.63 KB
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
themes.js
1.63 KB
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
wide-truncate.js
858 B
lrw-r--r--
2026-03-17 06:55:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).