# Class ResultInspector

This class is meant to be used with Node's util.inspect() function. Given a [[Format.Values.Result]] `value`, one can use `new ResultInspector(value)` to create a ResultInspector for that value, which can be used with util.inspect() to create a human-readable string representing the value.

#### Example

Suppose `value` is a Result. In Node, the following would print to the console a human-readable representation of `value`, with colors enabled, no maximum depth, and no maximum array length, and lines (usually) no longer than 80 characters:

    console.log(
      util.inspect(
        new ResultInspector(value),
        {
          colors: true,
          depth: null,
          maxArrayLength: null,
          breakLength: 80
        }
      )
    );

Of course, there are many other ways to use util.inspect; see Node's documentation, linked above, for more.

#### Hierarchy

- ResultInspector

- Defined in codec/lib/format/utils/inspect.ts:64

#####
Index

### Constructors

constructor

### Properties

options
result

### Methods

[custom]
inspect

## Constructors

### constructor

- new ResultInspector(result, options?): ResultInspector

- #### Parameters

  - ##### result: Result

  - ##### `Optional` options: ResultInspectorOptions

  #### Returns ResultInspector

  - Defined in codec/lib/format/utils/inspect.ts:67

## Properties

### options

options: ResultInspectorOptions

- Defined in codec/lib/format/utils/inspect.ts:66

### result

result: Result

- Defined in codec/lib/format/utils/inspect.ts:65

## Methods

### [custom]

- [custom](depth, options): string

- #### Parameters

  - ##### depth: number

  - ##### options: InspectOptions

  #### Returns string

  - Defined in codec/lib/format/utils/inspect.ts:78

### inspect

- inspect(depth, options): string

- #### Parameters

  - ##### depth: number

  - ##### options: InspectOptions

  #### Returns string

  #### Dev

  non-standard alternative interface name used by browser-util-inspect package

  - Defined in codec/lib/format/utils/inspect.ts:75

Generated using TypeDoc