$19 GRAYBYTE WORDPRESS FILE MANAGER $83

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/node_modules.bundled/gauge/lib/

HOME
Current File : /opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/node_modules.bundled/gauge/lib//progress-bar.js
'use strict'
var validate = require('aproba')
var renderTemplate = require('./render-template.js')
var wideTruncate = require('./wide-truncate')
var stringWidth = require('string-width')

module.exports = function (theme, width, completed) {
  validate('ONN', [theme, width, completed])
  if (completed < 0) {
    completed = 0
  }
  if (completed > 1) {
    completed = 1
  }
  if (width <= 0) {
    return ''
  }
  var sofar = Math.round(width * completed)
  var rest = width - sofar
  var template = [
    { type: 'complete', value: repeat(theme.complete, sofar), length: sofar },
    { type: 'remaining', value: repeat(theme.remaining, rest), length: rest },
  ]
  return renderTemplate(width, template, theme)
}

// lodash's way of repeating
function repeat (string, width) {
  var result = ''
  var n = width
  do {
    if (n % 2) {
      result += string
    }
    n = Math.floor(n / 2)
    /* eslint no-self-assign: 0 */
    string += string
  } while (n && stringWidth(result) < width)

  return wideTruncate(result, width)
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
1 Jan 1970 8.00 AM
root / root
0
base-theme.js
0.414 KB
7 Dec 2023 1.07 AM
root / root
0644
error.js
0.602 KB
7 Dec 2023 1.07 AM
root / root
0644
has-color.js
0.097 KB
7 Dec 2023 1.07 AM
root / root
0644
index.js
7.117 KB
7 Dec 2023 1.07 AM
root / root
0644
plumbing.js
1.249 KB
7 Dec 2023 1.07 AM
root / root
0644
process.js
0.087 KB
7 Dec 2023 1.07 AM
root / root
0644
progress-bar.js
1.011 KB
7 Dec 2023 1.07 AM
root / root
0644
render-template.js
5.811 KB
7 Dec 2023 1.07 AM
root / root
0644
set-immediate.js
0.136 KB
7 Dec 2023 1.07 AM
root / root
0644
set-interval.js
0.091 KB
7 Dec 2023 1.07 AM
root / root
0644
spin.js
0.103 KB
7 Dec 2023 1.07 AM
root / root
0644
template-item.js
1.931 KB
7 Dec 2023 1.07 AM
root / root
0644
theme-set.js
3.633 KB
7 Dec 2023 1.07 AM
root / root
0644
themes.js
1.628 KB
7 Dec 2023 1.07 AM
root / root
0644
wide-truncate.js
0.838 KB
7 Dec 2023 1.07 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF