MCPcopy 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
2export default function validateUrl({ hostname }) {
3 // If this isn't a valid url, return an error message
4 return !!hostname;
5}

Callers 2

parseFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected