MCPcopy Create free account
hub / github.com/ZToolsCenter/ZTools / ensureUrlProtocol

Method ensureUrlProtocol

src/main/api/renderer/webSearch.ts:385–390  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

383 }
384
385 private ensureUrlProtocol(url: string): string {
386 if (/^https?:\/\//i.test(url)) {
387 return url
388 }
389 return `https://${url}`
390 }
391
392 /**
393 * 从 HTML 中解析 favicon URL

Callers 3

fetchFaviconMethod · 0.95
normalizeHttpUrlMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected