MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / hexDump

Function hexDump

test/websocket/nodejs_websocket_echo_server.js:6–17  ·  view source on GitHub ↗
(bytes)

Source from the content-addressed store, hash-verified

4}
5
6function hexDump(bytes) {
7 var s = ' ';
8 for(var i = 0; i < bytes.length; ++i) {
9 s += ' ' + padHex(bytes[i], 2);
10 if (i % 16 == 15) {
11 console.log(s);
12 s = ' ';
13 }
14 else if (i % 8 == 7) s += ' ';
15 }
16 console.log(s);
17}
18
19var decoder = new TextDecoder('utf-8');
20var port = 8089;

Callers 1

Calls 2

padHexFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected