MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / tryToCreateValidUrlFromValue

Function tryToCreateValidUrlFromValue

packages/cli/src/cli/index.ts:276–284  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

274}
275
276function tryToCreateValidUrlFromValue(input: string): string {
277 let possibleUrl = input;
278
279 if (!input.startsWith("http://") && !input.startsWith("https://")) {
280 possibleUrl = input.includes("localhost") ? `http://${input}` : `https://${input}`;
281 }
282
283 return possibleUrl;
284}

Callers 2

promptTriggerUrlFunction · 0.85
createUrlValidatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…