MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / parseUrlSafely

Function parseUrlSafely

background.js:3212–3222  ·  view source on GitHub ↗
(rawUrl)

Source from the content-addressed store, hash-verified

3210}
3211
3212function parseUrlSafely(rawUrl) {
3213 if (typeof navigationUtils !== 'undefined' && navigationUtils?.parseUrlSafely) {
3214 return navigationUtils.parseUrlSafely(rawUrl);
3215 }
3216 if (!rawUrl) return null;
3217 try {
3218 return new URL(rawUrl);
3219 } catch {
3220 return null;
3221 }
3222}
3223
3224function normalizeSub2ApiUrl(rawUrl) {
3225 if (typeof navigationUtils !== 'undefined' && navigationUtils?.normalizeSub2ApiUrl) {

Callers 5

isSignupPasswordPageUrlFunction · 0.70
isLocalCpaUrlFunction · 0.70
matchesSourceUrlFamilyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected