PATH: //usr/lib/node_modules/npm/lib/utils
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 ansi-trim.js
↓
X
📄 audit-error.js
↓
X
📄 cmd-list.js
↓
X
📁 completion/
X
📄 completion.sh
↓
X
📁 config/
X
📄 did-you-mean.js
↓
X
📄 display.js
↓
X
📄 error-message.js
↓
X
📄 exit-handler.js
↓
X
📄 explain-dep.js
↓
X
📄 explain-eresolve.js
↓
X
📄 format-bytes.js
↓
X
📄 format-search-stream.js
↓
X
📄 get-identity.js
↓
X
📄 is-windows.js
↓
X
📄 log-file.js
↓
X
📄 log-shim.js
↓
X
📄 npm-usage.js
↓
X
📄 open-url-prompt.js
↓
X
📄 open-url.js
↓
X
📄 otplease.js
↓
X
📄 ping.js
↓
X
📄 pulse-till-done.js
↓
X
📄 queryable.js
↓
X
📄 read-user-info.js
↓
X
📄 reify-finish.js
↓
X
📄 reify-output.js
↓
X
📄 replace-info.js
↓
X
📄 tar.js
↓
X
📄 timers.js
↓
X
📄 update-notifier.js
↓
X
📄 validate-lockfile.js
↓
X
📄 web-auth.js
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: replace-info.js
const { cleanUrl } = require('npm-registry-fetch') const isString = (v) => typeof v === 'string' // split on \s|= similar to how nopt parses options const splitAndReplace = (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 += cleanUrl(str.slice(index, match.index)) + match[0] index = splitChars.lastIndex } return result + cleanUrl(str.slice(index)) } // replaces auth info in an array of arguments or in a strings function replaceInfo (arg) { if (isString(arg)) { return splitAndReplace(arg) } else if (Array.isArray(arg)) { return arg.map((a) => isString(a) ? splitAndReplace(a) : a) } return arg } module.exports = replaceInfo
SIMPAN PERUBAHAN