FunctionsgetUrlFromStringgetUrlFromString CallablegetUrlFromString(str: string): undefined | null | stringConverts a string to a URL and returns its string representation. If the string is not a valid URL, attempts to prepend "https://" before converting.@examplegetUrlFromString('example.com'); // 'https://example.com'getUrlFromString('https://example.com'); // 'https://example.com'getUrlFromString('not a url'); // null
Converts a string to a URL and returns its string representation. If the string is not a valid URL, attempts to prepend "https://" before converting.