patha
Version:
File paths library. All you need to work with paths. Tiny drop-in replacement for 'path'. Works in Node, Browser, and Deno.
16 lines (15 loc) • 404 B
text/typescript
/**
* Prefix a `./` for unix shell and nothing for `cmd`.
*
* @example
*
* ```js
* import { addShRelativePrefix } from "patha"
*
* addShRelativePrefix("some/file-name") // gives "some/file-name" on Windows and "./some/file-name" on others.
* ```
*
* @param path The given path
* @returns The path with `./` added on Unix
*/
export declare function addShRelativePrefix(path: string): string;