(...values: string[])
| 113 | } |
| 114 | |
| 115 | export 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 | |
| 123 | export function isURL(value: any): boolean { |
| 124 | return typeof value === "string" && /^(http|https)/.test(value); |
nothing calls this directly
no outgoing calls
no test coverage detected