MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / hidePassword

Function hidePassword

src/utils/Url.js:270–277  ·  view source on GitHub ↗

* * @param {string} url * @returns {string}

(url)

Source from the content-addressed store, hash-verified

268 * @returns {string}
269 */
270 hidePassword(url) {
271 const { protocol, username, hostname, pathname } = URLParse(url);
272 if (protocol === "file:") {
273 return url;
274 } else {
275 return `${protocol}//${username}@${hostname}${pathname}`;
276 }
277 },
278 /**
279 * Decodes url and returns username, password, hostname, pathname, port and query
280 * @param {string} url

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected