UNPKG

@lonu/stc

Version:

A tool for converting OpenApi/Swagger/Apifox into code.

23 lines 936 B
/** * Joins a sequence of paths, then normalizes the resulting path. * * @example Usage * ```ts * import { join } from "@std/path/join"; * import { assertEquals } from "@std/assert"; * * if (Deno.build.os === "windows") { * assertEquals(join("C:\\foo", "bar", "baz\\quux", "garply", ".."), "C:\\foo\\bar\\baz\\quux"); * assertEquals(join(new URL("file:///C:/foo"), "bar", "baz/asdf", "quux", ".."), "C:\\foo\\bar\\baz\\asdf"); * } else { * assertEquals(join("/foo", "bar", "baz/quux", "garply", ".."), "/foo/bar/baz/quux"); * assertEquals(join(new URL("file:///foo"), "bar", "baz/asdf", "quux", ".."), "/foo/bar/baz/asdf"); * } * ``` * * @param path The path to join. This can be string or file URL. * @param paths Paths to be joined and normalized. * @returns The joined and normalized path. */ export declare function join(path: string | URL, ...paths: string[]): string; //# sourceMappingURL=join.d.ts.map