util: inspect ArrayBuffers contents as well

Inspecting an ArrayBuffer now also shows their binary contents.

PR-URL: https://github.com/nodejs/node/pull/25006
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Ruben Bridgewater authored and Anna Henningsen committed 2019-01-09 01:34:25 +01:00
1 parent 8d893f213d
commit aa07dd6248
5 files changed
+65 -30

No files matched your search

+5
View File
@@ -341,3 +341,8 @@ assert.strictEqual(
'\u001b[1mnull\u001b[22m ' +
'foobar'
);
assert.strictEqual(
util.format(new SharedArrayBuffer(4)),
'SharedArrayBuffer { [Uint8Contents]: <00 00 00 00>, byteLength: 4 }'
);