X7ROOT File Manager
Current Path:
/lib/node_modules/npm/node_modules/gauge
lib
/
node_modules
/
npm
/
node_modules
/
gauge
/
ðŸ“
..
📄
CHANGELOG.md
(6.23 KB)
📄
LICENSE
(751 B)
📄
README.md
(14.72 KB)
📄
base-theme.js
(395 B)
📄
error.js
(616 B)
📄
has-color.js
(292 B)
📄
index.js
(6.83 KB)
ðŸ“
node_modules
📄
package.json
(2.13 KB)
📄
plumbing.js
(1.24 KB)
📄
process.js
(89 B)
📄
progress-bar.js
(998 B)
📄
render-template.js
(5.6 KB)
📄
set-immediate.js
(139 B)
📄
set-interval.js
(93 B)
📄
spin.js
(105 B)
📄
template-item.js
(1.86 KB)
📄
theme-set.js
(3.61 KB)
📄
themes.js
(1.51 KB)
📄
wide-truncate.js
(828 B)
Editing: plumbing.js
'use strict' var consoleControl = require('console-control-strings') var renderTemplate = require('./render-template.js') var validate = require('aproba') var Plumbing = module.exports = function (theme, template, width) { if (!width) width = 80 validate('OAN', [theme, template, width]) this.showing = false this.theme = theme this.width = width this.template = template } Plumbing.prototype = {} Plumbing.prototype.setTheme = function (theme) { validate('O', [theme]) this.theme = theme } Plumbing.prototype.setTemplate = function (template) { validate('A', [template]) this.template = template } Plumbing.prototype.setWidth = function (width) { validate('N', [width]) this.width = width } Plumbing.prototype.hide = function () { return consoleControl.gotoSOL() + consoleControl.eraseLine() } Plumbing.prototype.hideCursor = consoleControl.hideCursor Plumbing.prototype.showCursor = consoleControl.showCursor Plumbing.prototype.show = function (status) { var values = Object.create(this.theme) for (var key in status) { values[key] = status[key] } return renderTemplate(this.width, this.template, values).trim() + consoleControl.color('reset') + consoleControl.eraseLine() + consoleControl.gotoSOL() }
Upload File
Create Folder