docs: getBestUrl docs
This commit is contained in:
@@ -633,7 +633,12 @@ export class WorkflowGenerator {
|
|||||||
return false;
|
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) => {
|
private getBestUrl = (url: string) => {
|
||||||
const parsedUrl = new URL(url);
|
const parsedUrl = new URL(url);
|
||||||
const protocol = parsedUrl.protocol === 'https:' || parsedUrl.protocol === 'http:' ? `${parsedUrl.protocol}//`: parsedUrl.protocol;
|
const protocol = parsedUrl.protocol === 'https:' || parsedUrl.protocol === 'http:' ? `${parsedUrl.protocol}//`: parsedUrl.protocol;
|
||||||
|
|||||||
Reference in New Issue
Block a user