import { sanitize } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/path/index.js";
Similar to normalize, but also remove the search string and hash string if present.
Examples
Example 1
Example 1
import { sanitize } from "@ayonli/jsext/path";
console.log(sanitize("foo/bar?query")); // "foo/bar"
console.log(sanitize("foo/bar#hash")); // "foo/bar"
console.log(sanitize("foo/bar/..?query#hash")); // "foo"
console.log(sanitize("foo/./bar/..?query#hash")); // "foo"