MCPcopy Create free account
hub / github.com/massCodeIO/massCode / getUrlHost

Function getUrlHost

src/main/api/routes/captures.ts:81–92  ·  view source on GitHub ↗
(url?: string)

Source from the content-addressed store, hash-verified

79}
80
81function getUrlHost(url?: string): string | undefined {
82 if (!url) {
83 return undefined
84 }
85
86 try {
87 return new URL(url).hostname
88 }
89 catch {
90 return undefined
91 }
92}
93
94function getHttpNameFromUrl(url?: string, method = 'GET'): string | undefined {
95 if (!url) {

Callers 1

resolveCaptureNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected