Skip to main content
variable URLJoin
import { URLJoin } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Joins all given URL segments together, then normalizes the resulting URL.

Use String.prototype.join('/') to combine URL segments, then a series of String.prototype.replace() calls with various regexps to normalize the resulting URL (remove double slashes, add proper slashes for protocol, remove slashes before parameters, combine parameters with '&' and normalize first parameter delimiter).

type

(...args: string[]) => unknown