@lou.codes/test
Version:
✅ Equality test with enforced readability
15 lines (14 loc) • 465 B
TypeScript
import type { ReadOnlyArray } from "@lou.codes/types";
/**
* Stringifies and colorizes an array representing a property path.
*
* @category Output
* @example
* ```typescript
* formatPropertyPath(["foo", "bar"]); // "foo.bar" (with colors)
* formatPropertyPath([]); // "it"
* ```
* @param propertyPath Path to format.
* @returns String with formatted path.
*/
export declare const formatPropertyPath: (propertyPath: ReadOnlyArray<PropertyKey>) => string;