debugObject()function
debugObject(value: object, depth = 1): string
| Param | Type | |
|---|---|---|
value | object | The object to debug. required |
depth | unknown | How many levels of nested containers to expand (defaults to 1). Defaults to 1 |
| Return | |
|---|---|
string | A human-readable string representation of the object. |
Convert an object into a readable debug string.
- Prefixes the constructor name for non-plain objects.
- Expands entries down to
depthlevels.
Examples
debugObject({ a: 1 }) // `{\n\t"a": 1\n}`