Commit 9a0249f
committed
feat: add util.inspect with full options support
Implements util.inspect() function with the following features:
- depth: control recursion depth for nested objects (supports null for infinite)
- colors: ANSI color output support
- showHidden: show non-enumerable properties
- customInspect: call Symbol.for('nodejs.util.inspect.custom') methods
- maxArrayLength: limit array/set/map elements displayed
- maxStringLength: truncate long strings
- sorted: sort object keys (boolean or custom comparator function)
- breakLength: line length at which to break to multiple lines
- compact: control inline vs multiline formatting (number or false)
Also exports:
- util.inspect.custom symbol (nodejs.util.inspect.custom)
- util.inspect.defaultOptions object
Fixes #12571 parent 59607c1 commit 9a0249f
File tree
5 files changed
+813
-36
lines changed- libs
- llrt_logging/src
- llrt_utils/src
- modules/llrt_util/src
- tests/unit
- types
5 files changed
+813
-36
lines changed
0 commit comments