Skip to content

Function inspectObject() ​

inspectObject(object: Record<PropertyKey, unknown>, options?: InspectionOptions): string

Source: inspect.ts

Returns a string representation of an object.

Parameters ​

object ​

Record<PropertyKey, unknown>

The object to inspect.

options? ​

InspectionOptions

Optional inspection options.

Returns ​

string

The resulting string.

Example ​

Note: The following example omits the options parameter for simplicity. In reality, the return values will contain ANSI escape codes unless you explicitly set colors to false.

ts
inspect({ first: true, second: false }) === "{ first: true, second: false }"

Built by Prozilla