This class is meant to be used with Node's
util.inspect()
function. Given a Format.Values.Resultvalue, 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:
This class is meant to be used with Node's util.inspect() function. Given a Format.Values.Result
value
, one can usenew 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.Suppose
value
is a Result. In Node, the following would print to the console a human-readable representation ofvalue
, with colors enabled, no maximum depth, and no maximum array length, and lines (usually) no longer than 80 characters:Of course, there are many other ways to use util.inspect; see Node's documentation, linked above, for more.