From 702d720af2c2f8173f5e617f8719821ecd8f71b0 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 00:42:55 +0530 Subject: [PATCH] docs: getBestUrl docs --- server/src/workflow-management/classes/Generator.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/workflow-management/classes/Generator.ts b/server/src/workflow-management/classes/Generator.ts index bade1a56..ae3db680 100644 --- a/server/src/workflow-management/classes/Generator.ts +++ b/server/src/workflow-management/classes/Generator.ts @@ -633,7 +633,12 @@ export class WorkflowGenerator { return false; } - + /** + * Returns the best possible url representation for a where condition according to the heuristics. + * @param url The url to be checked and possibly replaced. + * @private + * @returns {string | {$regex: string}} + */ private getBestUrl = (url: string) => { const parsedUrl = new URL(url); const protocol = parsedUrl.protocol === 'https:' || parsedUrl.protocol === 'http:' ? `${parsedUrl.protocol}//`: parsedUrl.protocol;