# UtilInspectOptions

Abstract type for the options object passed to inspect

Availability
0.8
0.8
9.2.0
Extends
Object

NOTE

This is an abstract type. Any object of this structure can be used where this type is used.

# Properties

# breakLength

Availability
0.8
0.8
9.2.0
breakLength :Number

The length at which input values are split across multiple lines. Set to Infinity to format the input as a single line (in combination with compact set to true or any number >= 1).

Default: 80


# colors

Availability
0.8
0.8
9.2.0
colors :Boolean

If true, the output is styled with ANSI color codes. Colors are customizable.

Default: false


# compact

Availability
0.8
0.8
9.2.0
compact :Boolean | Number

Setting this to false causes each object key to be displayed on a new line. It will also add new lines to text that is longer than breakLength. If set to a number, the most n inner elements are united on a single line as long as all properties fit into breakLength. Short array elements are also grouped together. No text will be reduced below 16 characters, no matter the breakLength size. For more information, see the example below.

Default: 3


# customInspect

Availability
0.8
0.8
9.2.0
customInspect :Boolean

If false, [util.inspect.custom](depth, opts) functions are not invoked.

Default: true


# depth

Availability
0.8
0.8
9.2.0
depth :Number

Specifies the number of times to recurse while formatting object. This is useful for inspecting large objects. To recurse up to the maximum call stack size pass Infinity or null.

Default: 2


# getters

Availability
0.8
0.8
9.2.0
getters :Boolean | String

If set to true, getters are inspected. If set to 'get', only getters without a corresponding setter are inspected. If set to 'set', only getters with a corresponding setter are inspected. This might cause side effects depending on the getter function.

Default: false


# maxArrayLength

Availability
0.8
0.8
9.2.0
maxArrayLength :Number

Specifies the maximum number of Array, TypedArray, WeakMap and WeakSet elements to include when formatting. Set to null or Infinity to show all elements. Set to 0 or negative to show no elements.

Default: 100


# maxStringLength

Availability
0.8
0.8
9.2.0
maxStringLength :Number

Specifies the maximum number of characters to include when formatting. Set to null or Infinity to show all elements. Set to 0 or negative to show no characters.

Default: 10000


# showHidden

Availability
0.8
0.8
9.2.0
showHidden :Boolean

If true, object's non-enumerable symbols and properties are included in the formatted result. WeakMap and WeakSet entries are also included as well as user defined prototype properties (excluding method properties).

Default: false


# showProxy

Availability
0.8
0.8
9.2.0
showProxy :Boolean

If true, Proxy inspection includes the target and handler objects.

Default: false


# sorted

Availability
0.8
0.8
9.2.0
sorted :Boolean | Function

If set to true or a function, all properties of an object, and Set and Map entries are sorted in the resulting string. If set to true the default sort is used. If set to a function, it is used as a compare function.