import { normalize } from "https://deno.land/std@0.224.0/url/mod.ts";
Normalizes the URL or URL string, resolving ..
and .
segments. Multiple
sequential /
s are resolved into a single /
.
Examples
Example 1
Example 1
import { normalize } from "https://deno.land/std@0.224.0/url/normalize.ts";
normalize("https:///deno.land///std//assert//.//mod.ts").href;
// "https://deno.land/std/path/mod.ts"
normalize("https://deno.land/std/assert/../async/retry.ts").href;
// "https://deno.land/std/async/retry.ts"
Parameters
url: string | URL
URL to be normalized.