$67 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-nodejs20/root/usr/lib/node_modules/npm/lib/utils/

HOME
Current File : /opt/alt/alt-nodejs20/root/usr/lib/node_modules/npm/lib/utils//format.js
const { formatWithOptions: baseFormatWithOptions } = require('node:util')

// 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', ...options }, ...args) => {
  const prefix = prefixes.filter(p => p != null).join(' ')
  const formatted = STRIP_C01(baseFormatWithOptions(options, ...args))
  // 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 [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
12 Sep 2025 9.24 PM
root / root
0755
audit-error.js
1.021 KB
28 Aug 2025 8.06 PM
root / root
0644
auth.js
3.214 KB
28 Aug 2025 8.06 PM
root / root
0644
cmd-list.js
2.89 KB
28 Aug 2025 8.06 PM
root / root
0644
completion.fish
1.559 KB
28 Aug 2025 8.06 PM
root / root
0644
completion.sh
1.854 KB
28 Aug 2025 8.06 PM
root / root
0755
did-you-mean.js
1.16 KB
28 Aug 2025 8.06 PM
root / root
0644
display.js
15.38 KB
28 Aug 2025 8.06 PM
root / root
0644
error-message.js
14.601 KB
28 Aug 2025 8.06 PM
root / root
0644
explain-dep.js
3.03 KB
28 Aug 2025 8.06 PM
root / root
0644
explain-eresolve.js
2.556 KB
28 Aug 2025 8.06 PM
root / root
0644
format-bytes.js
0.614 KB
28 Aug 2025 8.06 PM
root / root
0644
format-search-stream.js
4.695 KB
28 Aug 2025 8.06 PM
root / root
0644
format.js
1.911 KB
28 Aug 2025 8.06 PM
root / root
0644
get-identity.js
0.783 KB
28 Aug 2025 8.06 PM
root / root
0644
get-workspaces.js
1.707 KB
28 Aug 2025 8.06 PM
root / root
0644
installed-deep.js
1.103 KB
28 Aug 2025 8.06 PM
root / root
0644
installed-shallow.js
0.569 KB
28 Aug 2025 8.06 PM
root / root
0644
is-windows.js
0.173 KB
28 Aug 2025 8.06 PM
root / root
0644
log-file.js
7.784 KB
28 Aug 2025 8.06 PM
root / root
0644
npm-usage.js
2.016 KB
28 Aug 2025 8.06 PM
root / root
0644
open-url.js
2.357 KB
28 Aug 2025 8.06 PM
root / root
0644
output-error.js
0.749 KB
28 Aug 2025 8.06 PM
root / root
0644
ping.js
0.246 KB
28 Aug 2025 8.06 PM
root / root
0644
queryable.js
9.556 KB
28 Aug 2025 8.06 PM
root / root
0644
read-user-info.js
1.91 KB
28 Aug 2025 8.06 PM
root / root
0644
reify-finish.js
0.865 KB
28 Aug 2025 8.06 PM
root / root
0644
reify-output.js
5.652 KB
28 Aug 2025 8.06 PM
root / root
0644
sbom-cyclonedx.js
5.206 KB
28 Aug 2025 8.06 PM
root / root
0644
sbom-spdx.js
4.586 KB
28 Aug 2025 8.06 PM
root / root
0644
tar.js
3.469 KB
28 Aug 2025 8.06 PM
root / root
0644
timers.js
2.07 KB
28 Aug 2025 8.06 PM
root / root
0644
update-workspaces.js
0.989 KB
28 Aug 2025 8.06 PM
root / root
0644
validate-lockfile.js
0.999 KB
28 Aug 2025 8.06 PM
root / root
0644
verify-signatures.js
11.918 KB
28 Aug 2025 8.06 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF