summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npmlog/node_modules/gauge/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/npmlog/node_modules/gauge/index.js')
-rw-r--r--deps/npm/node_modules/npmlog/node_modules/gauge/index.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/index.js
index 7eefb9507b..17b4ece06e 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/index.js
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/index.js
@@ -74,6 +74,10 @@ function Gauge (arg1, arg2) {
}
Gauge.prototype = {}
+Gauge.prototype.isEnabled = function () {
+ return !this._disabled
+}
+
Gauge.prototype.setTemplate = function (template) {
this._gauge.setTemplate(template)
if (this._showing) this._requestRedraw()
@@ -164,7 +168,6 @@ Gauge.prototype.hide = function (cb) {
}
Gauge.prototype.show = function (section, completed) {
- if (this._disabled) return
this._showing = true
if (typeof section === 'string') {
this._status.section = section
@@ -176,14 +179,15 @@ Gauge.prototype.show = function (section, completed) {
}
}
if (completed != null) this._status.completed = completed
+ if (this._disabled) return
this._requestRedraw()
}
Gauge.prototype.pulse = function (subsection) {
- if (this._disabled) return
- if (!this._showing) return
this._status.subsection = subsection || ''
this._status.spun ++
+ if (this._disabled) return
+ if (!this._showing) return
this._requestRedraw()
}