$78 GRAYBYTE WORDPRESS FILE MANAGER $91

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/alt-nodejs24/root/usr/lib/node_modules/npm/lib/utils/

HOME
Current File : /opt/alt/alt-nodejs24/root/usr/lib/node_modules/npm/lib/utils//format.js
// All logging goes through here, both to console and log files

const { formatWithOptions: baseFormatWithOptions } = require('node:util')
const { redactLog } = require('@npmcli/redact')

// These are most assuredly not a mistake
// https://eslint.org/docs/latest/rules/no-control-regex
// \x00 through \x1f, \x7f through \x9f, not including \x09 \x0a \x0b \x0d
/* eslint-disable-next-line no-control-regex */
const HAS_C01 = /[\x00-\x08\x0c\x0e-\x1f\x7f-\x9f]/

// Allows everything up to '[38;5;255m' in 8 bit notation
const ALLOWED_SGR = /^\[[0-9;]{0,8}m/

// '[38;5;255m'.length
const SGR_MAX_LEN = 10

// Strips all ANSI C0 and C1 control characters (except for SGR up to 8 bit)
function STRIP_C01 (str) {
  if (!HAS_C01.test(str)) {
    return str
  }
  let result = ''
  for (let i = 0; i < str.length; i++) {
    const char = str[i]
    const code = char.charCodeAt(0)
    if (!HAS_C01.test(char)) {
      // Most characters are in this set so continue early if we can
      result = `${result}${char}`
    } else if (code === 27 && ALLOWED_SGR.test(str.slice(i + 1, i + SGR_MAX_LEN + 1))) {
      // \x1b with allowed SGR
      result = `${result}\x1b`
    } else if (code <= 31) {
      // escape all other C0 control characters besides \x7f
      result = `${result}^${String.fromCharCode(code + 64)}`
    } else {
      // hasC01 ensures this is now a C1 control character or \x7f
      result = `${result}^${String.fromCharCode(code - 64)}`
    }
  }
  return result
}

const formatWithOptions = ({ prefix: prefixes = [], eol = '\n', redact = true, ...options }, ...args) => {
  const prefix = prefixes.filter(p => p != null).join(' ')
  let formatted = STRIP_C01(baseFormatWithOptions(options, ...args))
  if (redact) {
    formatted = redactLog(formatted)
  }
  // Splitting could be changed to only `\n` once we are sure we only emit unix newlines.
  // The eol param to this function will put the correct newlines in place for the returned string.
  const lines = formatted.split(/\r?\n/)
  return lines.reduce((acc, l) => `${acc}${prefix}${prefix && l ? ' ' : ''}${l}${eol}`, '')
}

module.exports = { formatWithOptions }


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
14 Mar 2026 8.32 AM
root / root
0755
audit-error.js
1.021 KB
23 Feb 2026 7.38 AM
root / root
0644
auth.js
3.214 KB
23 Feb 2026 7.38 AM
root / root
0644
cmd-list.js
2.878 KB
23 Feb 2026 7.38 AM
root / root
0644
completion.fish
1.559 KB
23 Feb 2026 7.38 AM
root / root
0644
completion.sh
1.854 KB
23 Feb 2026 7.38 AM
root / root
0755
did-you-mean.js
1.116 KB
23 Feb 2026 7.38 AM
root / root
0644
display.js
15.547 KB
23 Feb 2026 7.38 AM
root / root
0644
error-message.js
14.895 KB
23 Feb 2026 7.38 AM
root / root
0644
explain-dep.js
3.03 KB
23 Feb 2026 7.38 AM
root / root
0644
explain-eresolve.js
2.556 KB
23 Feb 2026 7.38 AM
root / root
0644
format-bytes.js
0.614 KB
23 Feb 2026 7.38 AM
root / root
0644
format-search-stream.js
4.783 KB
23 Feb 2026 7.38 AM
root / root
0644
format.js
2.09 KB
23 Feb 2026 7.38 AM
root / root
0644
get-identity.js
0.783 KB
23 Feb 2026 7.38 AM
root / root
0644
get-workspaces.js
1.707 KB
23 Feb 2026 7.38 AM
root / root
0644
installed-deep.js
1.103 KB
23 Feb 2026 7.38 AM
root / root
0644
installed-shallow.js
0.569 KB
23 Feb 2026 7.38 AM
root / root
0644
is-windows.js
0.173 KB
23 Feb 2026 7.38 AM
root / root
0644
log-file.js
7.785 KB
23 Feb 2026 7.38 AM
root / root
0644
npm-usage.js
2.016 KB
23 Feb 2026 7.38 AM
root / root
0644
oidc.js
6.932 KB
23 Feb 2026 7.38 AM
root / root
0644
open-url.js
2.501 KB
23 Feb 2026 7.38 AM
root / root
0644
output-error.js
0.749 KB
23 Feb 2026 7.38 AM
root / root
0644
ping.js
0.262 KB
23 Feb 2026 7.38 AM
root / root
0644
queryable.js
9.559 KB
23 Feb 2026 7.38 AM
root / root
0644
read-user-info.js
1.91 KB
23 Feb 2026 7.38 AM
root / root
0644
reify-finish.js
0.865 KB
23 Feb 2026 7.38 AM
root / root
0644
reify-output.js
6.349 KB
23 Feb 2026 7.38 AM
root / root
0644
sbom-cyclonedx.js
5.365 KB
23 Feb 2026 7.38 AM
root / root
0644
sbom-spdx.js
4.981 KB
23 Feb 2026 7.38 AM
root / root
0644
tar.js
3.429 KB
23 Feb 2026 7.38 AM
root / root
0644
timers.js
2.07 KB
23 Feb 2026 7.38 AM
root / root
0644
update-workspaces.js
0.989 KB
23 Feb 2026 7.38 AM
root / root
0644
validate-lockfile.js
0.999 KB
23 Feb 2026 7.38 AM
root / root
0644
verify-signatures.js
11.586 KB
23 Feb 2026 7.38 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF