Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/garrytan/gstack
/ extractDomain
Function
extractDomain
browse/src/security.ts:668–674 ·
view source on GitHub ↗
(url: string)
Source
from the content-addressed store, hash-verified
666
* Returns empty string on parse failure rather than throwing.
667
*/
668
export
function
extractDomain(url: string): string {
669
try {
670
return
new
URL(url).hostname;
671
} catch {
672
return
''
;
673
}
674
}
Callers
1
security.test.ts
File · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected