MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / hostnameOf

Function hostnameOf

packages/plugins/mcp/src/sdk/manifest.ts:150–153  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

148 .replace(/^_+|_+$/g, "");
149
150const hostnameOf = (url: string): string | null => {
151 if (!URL.canParse(url)) return null;
152 return new URL(url).hostname;
153};
154
155const basenameOf = (path: string): string => path.trim().split(/[\\/]/).pop() ?? path.trim();
156

Callers 1

deriveMcpNamespaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected