Overview
Used for logging, diagnostics, and debugging helper output in core services.
API Reference
Formats values into readable text for diagnostics and debug output.
import { PrettyPrinter } from '@rs-x/core';import { PrettyPrinter } from '@rs-x/core';
const instance = new PrettyPrinter(...args);3 members in this class.
constructor(indent: number = 4)Parameters
| Name | Type | Required |
|---|---|---|
| indent? | number | optional |
public toLines(
value: unknown,
level: number = 0,
quoteStrings: boolean = true,
options?: IPrettyPrinterOptions
): string[]Parameters
| Name | Type | Required |
|---|---|---|
| value | unknown | required |
| level? | number | optional |
| quoteStrings? | boolean | optional |
| options? | IPrettyPrinterOptions | optional |
Returns
string[]
public toString(
value: unknown,
quoteStrings: boolean = true,
options?: IPrettyPrinterOptions
): stringParameters
| Name | Type | Required |
|---|---|---|
| value | unknown | required |
| quoteStrings? | boolean | optional |
| options? | IPrettyPrinterOptions | optional |
Returns
string