REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.07 KB
Close
/proc/self/root/opt/alt/alt-nodejs22/root/lib/node_modules/npm/node_modules/@npmcli/redact/lib/index.js
Text
Base64
const matchers = require('./matchers') const { redactUrlPassword } = require('./utils') const REPLACE = '***' const redact = (value) => { if (typeof value !== 'string' || !value) { return value } return redactUrlPassword(value, REPLACE) .replace(matchers.NPM_SECRET.pattern, `npm_${REPLACE}`) .replace(matchers.UUID.pattern, REPLACE) } // split on \s|= similar to how nopt parses options const splitAndRedact = (str) => { // stateful regex, don't move out of this scope const splitChars = /[\s=]/g let match = null let result = '' let index = 0 while (match = splitChars.exec(str)) { result += redact(str.slice(index, match.index)) + match[0] index = splitChars.lastIndex } return result + redact(str.slice(index)) } // replaces auth info in an array of arguments or in a strings const redactLog = (arg) => { if (typeof arg === 'string') { return splitAndRedact(arg) } else if (Array.isArray(arg)) { return arg.map((a) => typeof a === 'string' ? splitAndRedact(a) : a) } return arg } module.exports = { redact, redactLog, }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
deep-map.js
2.21 KB
lrw-r--r--
2026-02-23 06:53:59
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error.js
1.06 KB
lrw-r--r--
2026-02-23 06:53:59
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
1.07 KB
lrw-r--r--
2026-02-23 06:53:59
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
matchers.js
1.96 KB
lrw-r--r--
2026-02-23 06:53:59
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
server.js
1.34 KB
lrw-r--r--
2026-02-23 06:53:59
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
5.61 KB
lrw-r--r--
2026-02-23 06:53:59
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).