MCPcopy
hub / github.com/simstudioai/sim / normalizeUrl

Function normalizeUrl

apps/sim/app/api/tools/stagehand/utils.ts:123–133  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

121}
122
123export function normalizeUrl(url: string): string {
124 // Normalize the URL - only add https:// if needed
125 let normalizedUrl = url
126
127 // Add https:// if no protocol is specified
128 if (!normalizedUrl.startsWith('http://') && !normalizedUrl.startsWith('https://')) {
129 normalizedUrl = `https://${normalizedUrl}`
130 }
131
132 return normalizedUrl
133}

Callers 2

route.tsFile · 0.90
route.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected