JSON.stringify for humans
npm install human-stringify 

Using JSON.stringify for debugging is very convenient, but risky. You never
know if the argument might be a large array, or have thousands of keys. Using a
debugger to inspect values avoids these problems, but then values are only
available at a point in time.
JSON.stringify is for machines. humanStringify is for humans:
* Automatically elides large strings, large arrays, and large objects. Humans
can't consume huge amounts of data anyway. humanStringify summarizes
existence of a large amount of data, not to present all of the values.
``js...string of len ${longString.length}
humanStringify(longString); // [...${bigArray.length} elements]
humanStringify(bigArray); // {...large object}
humanStringify(bigObject); // `
* Tells you about Uint8Arrays, Uint8ClampedArrays, and ArrayBuffer instances
and their sizes, but skips their contents.
`jsUint8Array(len: ${uint8Array.length})
humanStringify(uint8Array); // Uint8ClampedArray(len: ${uint8ClampedArray.length})
humanStringify(uint8ClampedArray); // ArrayBuffer(byteLength: ${arrayBuffer.byteLength}
humanStringify(arrayBuffer); // `
* Outputs function(){...} for Functions, instead of undefined.
* undefined results in the string "undefined" instead of the valueundefined
.
* humanStringify always returns a string. If it encounters a value it doesn't"
understand (probably a bug), it returns .
$ npm install human-stringify
`jsobj is ${humanStringify(obj)}
import humanStringify from "human-stringify";
console.log();`
Options:
`js``
humanStringify(obj, { limit: 100, compact: true, maxDepth: 5 });
* limit elides contents of arrays and objects with more than this number
of keys. Defaults to 100.
* compact If true, return a single line output. If false, return formatted
multiline output. Defaults to false.
* maxDepth Limit the depth of nested arrays and objects. This is helpful
for avoiding stack overflow with cyclical structures. It can also help avoid
overly noisy output. Defaults to 3.
$ npm install
$ npm run test
MIT. No dependencies.
