MCPcopy Create free account
hub / github.com/RioArisk/claudecode_api_RemoteControl / formatUrlForDisplay

Function formatUrlForDisplay

app/src/modules/utils.js:10–16  ·  view source on GitHub ↗
(url, includeScheme)

Source from the content-addressed store, hash-verified

8export function stripImageTags(s) { return (s || '').replace(/\[Image:\s*source:\s*[^\]]*\]/g, '').trim(); }
9
10export function formatUrlForDisplay(url, includeScheme) {
11 const auth = url.username ? `${url.username}${url.password ? `:${url.password}` : ''}@` : '';
12 const base = `${auth}${url.host}`;
13 const path = url.pathname === '/' ? '' : url.pathname;
14 const prefix = includeScheme ? `${url.protocol}//` : '';
15 return `${prefix}${base}${path}${url.search}${url.hash}`;
16}
17
18export function parseServerAddress(input) {
19 const raw = input.trim();

Callers 1

parseServerAddressFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected