MCPcopy
hub / github.com/opentrace/opentrace / extractHostname

Function extractHostname

plugins/opencode/src/index.ts:57–63  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

55export type OpentracePluginOptions = z.infer<typeof OpentracePluginOptionsSchema>
56
57function extractHostname(url: string): string | null {
58 try {
59 return new URL(url).hostname
60 } catch {
61 return null
62 }
63}
64
65/**
66 * Resolve the best git token for *url*.

Callers 1

resolveTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected