Use Node's util.inspect from the command line.
npm install util-inspect-cliUse util.inspect from the command line.


!ISC-licensed
!minimum Node.js version


``shell`
npm install util-inspect-cli
`Infinity
Usage:
util-inspect [options]
Options:
see also https://nodejs.org/docs/latest-v10.x/api/util.html#util_util_inspect_object_showhidden_depth_colors
--depth -d Number of nested levels to inspect. Pass
for infinite depth. Default: 2Infinity
--max-array-length -a Number of array elements to inspect.
Pass to show all. Default: 100`
--sorted -s Sort keys using Array.prototype.sort().
--color -c Inspect with colors? Default: based on
terminal support
--spacious Don't use a compact layout.
Note:
To select sub-trees of a JSON tree, use jq.
https://stedolan.github.io/jq/
Examples:
echo '{"foo": [{"bar": [1]}]}' | util-inspect --color
echo '[[1, 2, 3, 4, 5]]' | jq '.[0]' | util-inspect -a Infinity
echo '{"foo": 1, "_foo": 2}' | util-inspect --sorted
If you have a question or need support using util-inspect-cli`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.