@lou.codes/test
Version:
✅ Equality test with enforced readability
15 lines (14 loc) • 399 B
TypeScript
import type { ReadOnlyURL } from "../ReadOnlyURL.js";
/**
* Given a path, replace the CWD with a `"."` to make it relative.
*
* @category Output
* @example
* ```typescript
* // If CWD is `"/projects"`
* relativePath("/projects/tests/"); // "./tests/"
* ```
* @param path Path to make relative.
* @returns Relative path.
*/
export declare const relativePath: (url: ReadOnlyURL) => string;