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

Constructors

Properties

Methods

Constructors

Properties

result: Result

Methods

Generated using TypeDoc