zon-format
Version:
ZON: The most token-efficient serialization format for LLMs - beats CSV, TOON, JSON, and all competitors
32 lines (31 loc) • 925 B
TypeScript
/**
* ZON Pretty Printer
*
* Format and colorize ZON output for better readability
*/
export interface PrinterOptions {
/** Use colors for syntax highlighting */
colors?: boolean;
/** Indentation string (default: 2 spaces) */
indent?: string;
/** Show line numbers */
lineNumbers?: boolean;
/** Maximum line length before wrapping */
maxLineLength?: number;
}
/**
* Pretty print ZON with syntax highlighting
*/
export declare function prettyPrint(zon: string, options?: PrinterOptions): string;
/**
* Format a diff between two ZON strings
*/
export declare function diffPrint(oldZon: string, newZon: string, options?: PrinterOptions): string;
/**
* Compact print - minimize whitespace
*/
export declare function compactPrint(zon: string): string;
/**
* Expand print - add whitespace for readability
*/
export declare function expandPrint(zon: string, indentSize?: number): string;