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

Function normalizeLuckmailBaseUrl

luckmail-utils.js:58–74  ·  view source on GitHub ↗
(rawValue = '')

Source from the content-addressed store, hash-verified

56 }
57
58 function normalizeLuckmailBaseUrl(rawValue = '') {
59 const value = String(rawValue || '').trim();
60 if (!value) return DEFAULT_LUCKMAIL_BASE_URL;
61
62 try {
63 const parsed = new URL(value);
64 if (!['http:', 'https:'].includes(parsed.protocol)) {
65 return DEFAULT_LUCKMAIL_BASE_URL;
66 }
67 parsed.pathname = parsed.pathname.replace(/\/+$/, '');
68 parsed.search = '';
69 parsed.hash = '';
70 return parsed.toString().replace(/\/$/, '');
71 } catch {
72 return DEFAULT_LUCKMAIL_BASE_URL;
73 }
74 }
75
76 function normalizeLuckmailEmailType(rawValue = '') {
77 const normalized = String(rawValue || '').trim().toLowerCase();

Callers 5

resetStateFunction · 0.70
getLuckmailSessionConfigFunction · 0.70
requestLuckmailFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected