KC's Workspace
    Preparing search index...
    interface PrettyFormatOptions {
        callToJSON?: boolean;
        compareKeys?: CompareKeys;
        escapeRegex?: boolean;
        escapeString?: boolean;
        highlight?: boolean;
        indent?: number;
        maxDepth?: number;
        maxOutputLength?: number;
        maxWidth?: number;
        min?: boolean;
        plugins?: Plugins;
        printBasicPrototype?: boolean;
        printFunctionName?: boolean;
        printShadowRoot?: boolean;
    }
    Index
    callToJSON?: boolean

    Call toJSON on objects before formatting them. Ignored after the formatter has already called toJSON once for a value.

    true
    
    compareKeys?: CompareKeys

    Compare function used when sorting object keys. Set to null to disable sorting.

    escapeRegex?: boolean

    Whether to escape special characters in regular expressions.

    false
    
    escapeString?: boolean

    Whether to escape special characters in strings.

    true
    
    highlight?: boolean

    Whether to highlight syntax using terminal colors.

    false
    
    indent?: number

    Number of spaces to use for each level of indentation.

    2
    
    maxDepth?: number

    Maximum depth to recurse into nested values.

    Infinity
    
    maxOutputLength?: number

    Approximate per-depth-level budget for output length. When the accumulated output at any single depth level exceeds this value, further nesting is collapsed. This is a heuristic safety valve, not a hard limit — total output can reach up to roughly maxDepth × maxOutputLength.

    1_000_000
    
    maxWidth?: number

    Maximum number of items to print in arrays, sets, maps, and similar collections.

    Infinity
    
    min?: boolean

    Whether to minimize added whitespace, including indentation and line breaks.

    false
    
    plugins?: Plugins

    Plugins used to serialize application-specific data types.

    []
    
    printBasicPrototype?: boolean

    Whether to print Object / Array prefixes for plain objects and arrays.

    true
    
    printFunctionName?: boolean

    Whether to include the function name when formatting functions.

    true
    
    printShadowRoot?: boolean

    Whether to include shadow-root contents when formatting DOM nodes.

    true