Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/postlight/parser
/ validateUrl
Function
validateUrl
src/utils/validate-url.js:2–5 ·
view source on GitHub ↗
({ hostname })
Source
from the content-addressed store, hash-verified
1
// extremely simple url validation as a first step
2
export
default
function
validateUrl({ hostname }) {
3
// If this isn't a valid url, return an error message
4
return
!!hostname;
5
}
Callers
2
parse
Function · 0.90
validate-url.test.js
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected