Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/emscripten-core/emscripten
/ padHex
Function
padHex
test/websocket/nodejs_websocket_echo_server.js:1–4 ·
view source on GitHub ↗
(number, digits)
Source
from the content-addressed store, hash-verified
1
function
padHex(number, digits) {
2
var
s = number.toString(16);
3
return
Array(Math.max(digits - s.length + 1, 0)).join(0) + s;
4
}
5
6
function
hexDump(bytes) {
7
var
s =
' '
;
Callers
1
hexDump
Function · 0.85
Calls
2
join
Method · 0.45
max
Method · 0.45
Tested by
no test coverage detected