MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / looksLikeUrl

Function looksLikeUrl

packages/react/src/pages/integrations.tsx:182–189  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

180// search query (filter the preset list). Anything with a scheme, slash, or
181// host-with-TLD is treated as a URL; everything else is search.
182const looksLikeUrl = (raw: string): boolean => {
183 const v = raw.trim();
184 if (v.length === 0) return false;
185 if (/^[a-z][a-z0-9+\-.]*:\/\//i.test(v)) return true;
186 if (v.includes("/")) return true;
187 if (/^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}(?::\d+)?$/i.test(v)) return true;
188 return false;
189};
190
191function ConnectDialog(props: { open: boolean; onOpenChange: (open: boolean) => void }) {
192 const integrationPlugins = useIntegrationPlugins();

Callers 1

ConnectDialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected