From a10755b28cbf5b4e57e5c7174439cd93d14b2792 Mon Sep 17 00:00:00 2001 From: MillenniumEarl Date: Thu, 11 Mar 2021 11:04:36 +0100 Subject: [PATCH] Update JSDOC --- src/scripts/network-helper.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/scripts/network-helper.ts b/src/scripts/network-helper.ts index f672411..84eec13 100644 --- a/src/scripts/network-helper.ts +++ b/src/scripts/network-helper.ts @@ -273,12 +273,15 @@ export function enforceHttpsUrl(url: string): string { * Check if the url belongs to the domain of the F95 platform. */ export function isF95URL(url: string): boolean { - return url.toString().startsWith(urls.BASE); + return url.startsWith(urls.BASE); } /** * Checks if the string passed by parameter has a * properly formatted and valid path to a URL (HTTP/HTTPS). + * + * @author Daveo + * @see https://preview.tinyurl.com/y2f2e2pc */ export function isStringAValidURL(url: string): boolean { // Many thanks to Daveo at StackOverflow (https://preview.tinyurl.com/y2f2e2pc) @@ -291,9 +294,8 @@ export function isStringAValidURL(url: string): boolean { * Check if a particular URL is valid and reachable on the web. * @param {string} url URL to check * @param {boolean} [checkRedirect] - * If true, the function will consider redirects a violation and return false. - * Default: false - * @returns {Promise} true if the URL exists, false otherwise + * If `true`, the function will consider redirects a violation and return `false`. + * Default: `false` */ export async function urlExists( url: string,