MCPcopy Create free account
hub / github.com/Hello-Application-XH/HelloGML / urlJoin

Function urlJoin

src/utils.ts:115–121  ·  view source on GitHub ↗
(...values: string[])

Source from the content-addressed store, hash-verified

113}
114
115export function urlJoin(...values: string[]): string {
116 let url = "";
117 for (let i = 0; i < values.length; i++) {
118 url += `${i > 0 ? "/" : ""}${values[i].replace(/^\/*/, "").replace(/\/*$/, "")}`;
119 }
120 return url;
121}
122
123export function isURL(value: any): boolean {
124 return typeof value === "string" && /^(http|https)/.test(value);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected