mirror of
https://github.com/nodejs/node.git
synced 2025-05-11 01:04:44 +00:00
![]() Changes the custom inspect example to a more complex object that actually uses the parameters of the custom inspect function. I specifically chose a wrapper of a value called a "Box" that inspects to "Box < inner_inspect_value >". I also want there to be documentation explaining what the code is actually doing. E.g., the padding replacement part is to make the inspected value line up properly when multi-line inputs are given. I also went with having a space between the Box's brackets and the inner value because it matches how objects work, and that should definitely be listed as a convention somewhere in here. Also, the convention to shorten only when depth is less than 0, not e.g. at 0. But I don't know how to write the documentation for that, so I'm leaving that to somebody who reads this message. Ref: https://github.com/nodejs/node/issues/8442 PR-URL: https://github.com/nodejs/node/pull/8875 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> |
||
---|---|---|
.. | ||
_toc.md | ||
addons.md | ||
all.md | ||
assert.md | ||
buffer.md | ||
child_process.md | ||
cli.md | ||
cluster.md | ||
console.md | ||
crypto.md | ||
debugger.md | ||
dgram.md | ||
dns.md | ||
documentation.md | ||
domain.md | ||
errors.md | ||
events.md | ||
fs.md | ||
globals.md | ||
http.md | ||
https.md | ||
index.md | ||
modules.md | ||
net.md | ||
os.md | ||
path.md | ||
process.md | ||
punycode.md | ||
querystring.md | ||
readline.md | ||
repl.md | ||
stream.md | ||
string_decoder.md | ||
synopsis.md | ||
timers.md | ||
tls.md | ||
tty.md | ||
url.md | ||
util.md | ||
v8.md | ||
vm.md | ||
zlib.md |