UNPKG

abi.js

Version:

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

21 lines (20 loc) 590 B
/** * Resolves path to a namespace path. This is a no-op on * non-windows systems. * * @example Usage * ```ts * import { toNamespacedPath } from "@std/path/to-namespaced-path"; * import { assertEquals } from "@std/assert"; * * if (Deno.build.os === "windows") { * assertEquals(toNamespacedPath("C:\\foo\\bar"), "\\\\?\\C:\\foo\\bar"); * } else { * assertEquals(toNamespacedPath("/foo/bar"), "/foo/bar"); * } * ``` * * @param path Path to resolve to namespace. * @returns The resolved namespace path. */ export declare function toNamespacedPath(path: string): string;