UNPKG

@oazmi/build-tools

Version:

general deno build tool scripts which I practically use in all of my typescript repos

22 lines 818 B
import type { FormatInputPathObject } from "./_interface.js"; /** * Generate a path from a {@linkcode FormatInputPathObject} object. It does the * opposite of {@linkcode https://jsr.io/@std/path/doc/~/parse | parse()}. * * @example Usage * ```ts * import { format } from "@std/path/format"; * import { assertEquals } from "@std/assert/assert-equals"; * * if (Deno.build.os === "windows") { * assertEquals(format({ dir: "C:\\path\\to", base: "script.ts" }), "C:\\path\\to\\script.ts"); * } else { * assertEquals(format({ dir: "/path/to/dir", base: "script.ts" }), "/path/to/dir/script.ts"); * } * ``` * * @param pathObject Object with path components. * @returns The formatted path. */ export declare function format(pathObject: FormatInputPathObject): string; //# sourceMappingURL=format.d.ts.map