MCPcopy Create free account
hub / github.com/BuilderIO/SSDiff / isValidUrl

Function isValidUrl

packages/vite-plugin-realtime-diff/src/utils.ts:18–25  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

16 * @return {boolean} Whether the URL is valid.
17 */
18export function isValidUrl(url: string) {
19 try {
20 new URL(url);
21 return true;
22 } catch (_) {
23 return false;
24 }
25}

Callers 2

configureServerFunction · 0.90
utils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected