abi.js
Version:
[![typescript-icon]][typescript-link] [![license-icon]][license-link] [![status-icon]][status-link] [![ci-icon]][ci-link] [![twitter-icon]][twitter-link]
20 lines (19 loc) • 602 B
TypeScript
/**
* 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");
* } else {
* assertEquals(join("/foo", "bar", "baz/quux", "garply", ".."), "/foo/bar/baz/quux");
* }
* ```
*
* @param paths Paths to be joined and normalized.
* @returns The joined and normalized path.
*/
export declare function join(...paths: string[]): string;