Current Path: > > lib > node_modules > npm > node_modules > gauge
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
node_modules | Directory | - | - | |
CHANGELOG.md | File | 6376 bytes | March 10 2021 14:36:39. | |
LICENSE | File | 751 bytes | March 10 2021 14:36:39. | |
README.md | File | 15073 bytes | March 10 2021 14:36:39. | |
base-theme.js | File | 395 bytes | March 10 2021 14:36:39. | |
error.js | File | 616 bytes | March 10 2021 14:36:39. | |
has-color.js | File | 292 bytes | March 10 2021 14:36:39. | |
index.js | File | 6999 bytes | March 10 2021 14:36:39. | |
package.json | File | 2181 bytes | March 10 2021 14:36:39. | |
plumbing.js | File | 1269 bytes | March 10 2021 14:36:39. | |
process.js | File | 89 bytes | March 10 2021 14:36:39. | |
progress-bar.js | File | 998 bytes | March 10 2021 14:36:39. | |
render-template.js | File | 5739 bytes | March 10 2021 14:36:39. | |
set-immediate.js | File | 139 bytes | March 10 2021 14:36:39. | |
set-interval.js | File | 93 bytes | March 10 2021 14:36:39. | |
spin.js | File | 105 bytes | March 10 2021 14:36:39. | |
template-item.js | File | 1904 bytes | March 10 2021 14:36:39. | |
theme-set.js | File | 3693 bytes | March 10 2021 14:36:39. | |
themes.js | File | 1543 bytes | March 10 2021 14:36:39. | |
wide-truncate.js | File | 828 bytes | March 10 2021 14:36:39. |
'use strict' var objectAssign = require('object-assign') module.exports = function () { return ThemeSetProto.newThemeSet() } var ThemeSetProto = {} ThemeSetProto.baseTheme = require('./base-theme.js') ThemeSetProto.newTheme = function (parent, theme) { if (!theme) { theme = parent parent = this.baseTheme } return objectAssign({}, parent, theme) } ThemeSetProto.getThemeNames = function () { return Object.keys(this.themes) } ThemeSetProto.addTheme = function (name, parent, theme) { this.themes[name] = this.newTheme(parent, theme) } ThemeSetProto.addToAllThemes = function (theme) { var themes = this.themes Object.keys(themes).forEach(function (name) { objectAssign(themes[name], theme) }) objectAssign(this.baseTheme, theme) } ThemeSetProto.getTheme = function (name) { if (!this.themes[name]) throw this.newMissingThemeError(name) return this.themes[name] } ThemeSetProto.setDefault = function (opts, name) { if (name == null) { name = opts opts = {} } var platform = opts.platform == null ? 'fallback' : opts.platform var hasUnicode = !!opts.hasUnicode var hasColor = !!opts.hasColor if (!this.defaults[platform]) this.defaults[platform] = {true: {}, false: {}} this.defaults[platform][hasUnicode][hasColor] = name } ThemeSetProto.getDefault = function (opts) { if (!opts) opts = {} var platformName = opts.platform || process.platform var platform = this.defaults[platformName] || this.defaults.fallback var hasUnicode = !!opts.hasUnicode var hasColor = !!opts.hasColor if (!platform) throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) if (!platform[hasUnicode][hasColor]) { if (hasUnicode && hasColor && platform[!hasUnicode][hasColor]) { hasUnicode = false } else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { hasColor = false } else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor]) { hasUnicode = false hasColor = false } else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor]) { hasUnicode = false } else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { hasColor = false } else if (platform === this.defaults.fallback) { throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) } } if (platform[hasUnicode][hasColor]) { return this.getTheme(platform[hasUnicode][hasColor]) } else { return this.getDefault(objectAssign({}, opts, {platform: 'fallback'})) } } ThemeSetProto.newMissingThemeError = function newMissingThemeError (name) { var err = new Error('Could not find a gauge theme named "' + name + '"') Error.captureStackTrace.call(err, newMissingThemeError) err.theme = name err.code = 'EMISSINGTHEME' return err } ThemeSetProto.newMissingDefaultThemeError = function newMissingDefaultThemeError (platformName, hasUnicode, hasColor) { var err = new Error( 'Could not find a gauge theme for your platform/unicode/color use combo:\n' + ' platform = ' + platformName + '\n' + ' hasUnicode = ' + hasUnicode + '\n' + ' hasColor = ' + hasColor) Error.captureStackTrace.call(err, newMissingDefaultThemeError) err.platform = platformName err.hasUnicode = hasUnicode err.hasColor = hasColor err.code = 'EMISSINGTHEME' return err } ThemeSetProto.newThemeSet = function () { var themeset = function (opts) { return themeset.getDefault(opts) } return objectAssign(themeset, ThemeSetProto, { themes: objectAssign({}, this.themes), baseTheme: objectAssign({}, this.baseTheme), defaults: JSON.parse(JSON.stringify(this.defaults || {})) }) }
SILENT KILLER Tool