Formats binary data as a hexdump string.
Convenience wrapper around bin2text that returns a single string with newline-separated hexdump lines. Useful for logging or display purposes.
Binary data to format (any ArrayBufferView)
Maximum number of bytes to format (0 = all bytes)
Formatted hexdump as a string
const data = new Uint8Array([72, 101, 108, 108, 111]);const dump = bin2string(data);console.log(dump);// 0000 48 65 6c 6c 6f Hello Copy
const data = new Uint8Array([72, 101, 108, 108, 111]);const dump = bin2string(data);console.log(dump);// 0000 48 65 6c 6c 6f Hello
Formats binary data as a hexdump string.
Convenience wrapper around bin2text that returns a single string with newline-separated hexdump lines. Useful for logging or display purposes.