UNPKG

patha

Version:

File paths library. All you need to work with paths. Tiny drop-in replacement for 'path'. Works in Node, Browser, and Deno.

17 lines (16 loc) 507 B
/** * Add bin extension to the given binary name. * * @example * * ```js * import { addExeExt } from "patha" * * addExeExt("path/to/file-name") // gives "path/to/file-name.exe" on Windows and "path/to/file-name" on others * ``` * * @param name The name you want to add the shell extension to * @param win_ext Defaults to `.exe` on Windows * @param other_ext Defaults to `""` On other platforms. */ export declare function addExeExt(name: string, win_ext?: string, other_ext?: string): string;