import { split } from "https://deno.land/x/ayonli_jsext@v0.9.72/path.ts";
Splits the path
into well-formed segments.
Examples
Example 1
Example 1
import { split } from "@ayonli/jsext/path";
console.log(split("/usr/bin")); // ["/", "usr", "bin"]
console.log(split("C:\\Windows\\System32")); // ["C:\\", "Windows", "System32"]
console.log(split("file:///user/bin")); // ["file:///", "usr", "bin"]
console.log(split("http://example.com/foo/bar?foo=bar#baz"));
// ["http://example.com", "foo", "bar", "?foo=bar", "#baz"]