namespace

inspect

function inspect(
arg: any,
): string;

Pretty-prints an object to a string, the same as console.log

Supports JSX

@param arg

The value to inspect

@param options

Options for the inspection

namespace inspect

  • const custom: inspect.custom

    Symbol for declaring a custom inspect function on an object. Same as util.inspect.custom in Node.js.

  • function table(
    tabularData: object | unknown[],
    properties?: string[],
    options?: { colors: boolean }
    ): string;

    Pretty-print an object or array as a table

    Like console.table, except it returns a string

    function table(
    tabularData: object | unknown[],
    options?: { colors: boolean }
    ): string;

    Pretty-print an object or array as a table

    Like console.table, except it returns a string