UNPKG

abi.js

Version:

[![typescript-icon]][typescript-link] [![license-icon]][license-link] [![status-icon]][status-link] [![ci-icon]][ci-link] [![twitter-icon]][twitter-link]

22 lines (21 loc) 672 B
/** * Resolves path segments into a path. * * @example Usage * ```ts * import { resolve } from "@std/path/resolve"; * import { assertEquals } from "@std/assert"; * * if (Deno.build.os === "windows") { * assertEquals(resolve("C:\\foo", "bar", "baz"), "C:\\foo\\bar\\baz"); * assertEquals(resolve("C:\\foo", "C:\\bar", "baz"), "C:\\bar\\baz"); * } else { * assertEquals(resolve("/foo", "bar", "baz"), "/foo/bar/baz"); * assertEquals(resolve("/foo", "/bar", "baz"), "/bar/baz"); * } * ``` * * @param pathSegments Path segments to process to path. * @returns The resolved path. */ export declare function resolve(...pathSegments: string[]): string;