debugArray()function

debugArray(value: ImmutableArray, depth = 1): string
ParamType
valueImmutableArray
The array to debug. required
depthunknown
How many levels of nested containers to expand (defaults to 1). Defaults to 1
Return
string
A human-readable string representation of the array.

Convert an array into a readable debug string.

  • Prefixes the constructor name for non-plain arrays.
  • Expands items down to depth levels.

Examples

debugArray([1, 2]) // `[\n\t1,\n\t2\n]`