a tool for shared writing and social publishing
at refactor/pub-settings 9 lines 191 B view raw
1export function ensureProtocol(url: string) { 2 if ( 3 url.startsWith("http") || 4 url.startsWith("mailto") || 5 url.startsWith("tel:") 6 ) 7 return url; 8 return `https://${url}`; 9}