MCPcopy
hub / github.com/github/awesome-copilot / isValidUrl

Function isValidUrl

extensions/site-studio/extension.mjs:467–474  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

465}
466
467function isValidUrl(value) {
468 try {
469 const url = new URL(value);
470 return ["http:", "https:"].includes(url.protocol);
471 } catch {
472 return false;
473 }
474}
475
476function validateFieldValue(sectionId, field, value, mark = "draft") {
477 const schema = getFieldSchemaForSection(sectionId, field);

Callers 1

validateFieldValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected