Global

Methods

compare(exp, act, opt_path, opt_deep, opt_resukts)

Function to compute the difference between two values. Note that unlike many other object diff implementations, this one tries to 'humanize' the results, summarizing them for improved readability.

Parameters:
Name Type Description
exp string

The expected value.

act string

The actual value.

opt_path string

The expression used to access the value, such as 'a.b.c'.

opt_deep bool

Whether to do a deep comparison.

opt_resukts Array

If non-null, will be used to report the differences between the expected and actual values.

Source:

(protected) format()

Global format function

Source:

(protected) formatArray(value, options)

Convert an array value to a printable string representation.

Parameters:
Name Type Description
value Array

The value to format.

options Object

Formatting options.

Source:

(protected) formatMap(value, options)

Convert a map value to a printable string representation.

Parameters:
Name Type Description
value Map

The value to format.

options Object

Formatting options.

Source:

(protected) formatObject(value, options)

Convert an object value to a printable string representation.

Parameters:
Name Type Description
value Object

The value to format.

options Object

Formatting options.

Source:

(protected) formatPromise(value, options)

Convert a promise value to a printable string representation.

Parameters:
Name Type Description
value Promise

The value to format.

options Object

Formatting options.

Source:

(protected) formatSet(value, options)

Convert a set value to a printable string representation.

Parameters:
Name Type Description
value Set

The value to format.

options Object

Formatting options.

Source:

(protected) formatString(value, options)

Convert a string value to a printable string representation.

Parameters:
Name Type Description
value String

The value to format.

options Object

Formatting options.

Source: