Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/027xiguapi/code-box
/ isValidUrl
Function
isValidUrl
tools.ts:176–182 ·
view source on GitHub ↗
(urlString: string)
Source
from the content-addressed store, hash-verified
174
}
175
176
export
function
isValidUrl(urlString: string) {
177
try {
178
return
Boolean(
new
URL(urlString))
179
} catch (e) {
180
return
false
181
}
182
}
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected